You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(75) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(70) |
Feb
(20) |
Mar
(52) |
Apr
(149) |
May
(387) |
Jun
(466) |
Jul
(133) |
Aug
(87) |
Sep
(122) |
Oct
(140) |
Nov
(185) |
Dec
(105) |
| 2010 |
Jan
(85) |
Feb
(45) |
Mar
(75) |
Apr
(17) |
May
(41) |
Jun
(52) |
Jul
(33) |
Aug
(29) |
Sep
(36) |
Oct
(15) |
Nov
(26) |
Dec
(34) |
| 2011 |
Jan
(26) |
Feb
(25) |
Mar
(26) |
Apr
(29) |
May
(20) |
Jun
(27) |
Jul
(15) |
Aug
(32) |
Sep
(13) |
Oct
(64) |
Nov
(60) |
Dec
(10) |
| 2012 |
Jan
(64) |
Feb
(63) |
Mar
(39) |
Apr
(43) |
May
(54) |
Jun
(11) |
Jul
(30) |
Aug
(45) |
Sep
(11) |
Oct
(70) |
Nov
(24) |
Dec
(23) |
| 2013 |
Jan
(17) |
Feb
(8) |
Mar
(35) |
Apr
(40) |
May
(20) |
Jun
(24) |
Jul
(36) |
Aug
(25) |
Sep
(42) |
Oct
(40) |
Nov
(9) |
Dec
(21) |
| 2014 |
Jan
(29) |
Feb
(24) |
Mar
(60) |
Apr
(22) |
May
(22) |
Jun
(46) |
Jul
(11) |
Aug
(23) |
Sep
(26) |
Oct
(10) |
Nov
(14) |
Dec
(2) |
| 2015 |
Jan
(28) |
Feb
(47) |
Mar
(33) |
Apr
(58) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(8) |
Sep
(12) |
Oct
(25) |
Nov
(58) |
Dec
(21) |
| 2016 |
Jan
(12) |
Feb
(40) |
Mar
(2) |
Apr
(1) |
May
(67) |
Jun
(2) |
Jul
(5) |
Aug
(36) |
Sep
|
Oct
(24) |
Nov
(17) |
Dec
(50) |
| 2017 |
Jan
(14) |
Feb
(16) |
Mar
(2) |
Apr
(35) |
May
(14) |
Jun
(16) |
Jul
(3) |
Aug
(3) |
Sep
|
Oct
(19) |
Nov
|
Dec
(16) |
| 2018 |
Jan
(55) |
Feb
(11) |
Mar
(34) |
Apr
(14) |
May
(4) |
Jun
(20) |
Jul
(39) |
Aug
(16) |
Sep
(17) |
Oct
(16) |
Nov
(20) |
Dec
(30) |
| 2019 |
Jan
(29) |
Feb
(24) |
Mar
(37) |
Apr
(26) |
May
(19) |
Jun
(21) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
| 2020 |
Jan
(47) |
Feb
(36) |
Mar
(54) |
Apr
(44) |
May
(37) |
Jun
(19) |
Jul
(32) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(32) |
Dec
(11) |
| 2021 |
Jan
(14) |
Feb
(5) |
Mar
(40) |
Apr
(32) |
May
(42) |
Jun
(31) |
Jul
(29) |
Aug
(47) |
Sep
(38) |
Oct
(17) |
Nov
(74) |
Dec
(33) |
| 2022 |
Jan
(11) |
Feb
(15) |
Mar
(40) |
Apr
(21) |
May
(39) |
Jun
(44) |
Jul
(19) |
Aug
(46) |
Sep
(79) |
Oct
(35) |
Nov
(21) |
Dec
(15) |
| 2023 |
Jan
(56) |
Feb
(13) |
Mar
(43) |
Apr
(28) |
May
(60) |
Jun
(15) |
Jul
(29) |
Aug
(28) |
Sep
(32) |
Oct
(21) |
Nov
(42) |
Dec
(39) |
| 2024 |
Jan
(35) |
Feb
(17) |
Mar
(28) |
Apr
(7) |
May
(14) |
Jun
(35) |
Jul
(30) |
Aug
(35) |
Sep
(30) |
Oct
(28) |
Nov
(38) |
Dec
(18) |
| 2025 |
Jan
(21) |
Feb
(28) |
Mar
(36) |
Apr
(35) |
May
(34) |
Jun
(58) |
Jul
(9) |
Aug
(54) |
Sep
(47) |
Oct
(15) |
Nov
(58) |
Dec
|
|
From: <oh...@ma...> - 2009-06-07 15:55:32
|
Author: oharboe
Date: 2009-06-07 15:55:29 +0200 (Sun, 07 Jun 2009)
New Revision: 2092
Added:
trunk/src/jtag/minidummy.c
trunk/src/jtag/minidummy/
trunk/src/jtag/minidummy/jtag_minidriver.h
Modified:
trunk/configure.in
trunk/src/jtag/Makefile.am
trunk/src/jtag/jtag.c
Log:
minidriver build test driver "minidriver"
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2009-06-07 05:24:27 UTC (rev 2091)
+++ trunk/configure.in 2009-06-07 13:55:29 UTC (rev 2092)
@@ -323,6 +323,10 @@
AS_HELP_STRING([--enable-ecosboard], [Enable building support for eCosBoard based JTAG debugger]),
[build_ecosboard=$enableval], [build_ecosboard=no])
+AC_ARG_ENABLE(minidummy,
+ AS_HELP_STRING([--enable-minidummy], [Enable building support for minidummy driver]),
+ [build_minidummy=$enableval], [build_minidummy=no])
+
AC_ARG_ENABLE(ioutil,
AS_HELP_STRING([--enable-ioutil], [Enable ioutil functions - useful for standalone OpenOCD implementations]),
[build_ioutil=$enableval], [build_ioutil=no])
@@ -459,6 +463,12 @@
AC_DEFINE(BUILD_ECOSBOARD, 0, [0 if you don't want eCosBoard.])
fi
+if test $build_minidummy = yes; then
+ AC_DEFINE(BUILD_MINIDUMMY, 1, [1 if you want minidummy.])
+else
+ AC_DEFINE(BUILD_MINIDUMMY, 0, [0 if you don't want minidummy.])
+fi
+
if test $build_ioutil = yes; then
AC_DEFINE(BUILD_IOUTIL, 1, [1 if you want ioutils.])
else
@@ -835,6 +845,7 @@
AM_CONDITIONAL(GIVEIO, test $parport_use_giveio = yes)
AM_CONDITIONAL(EP93XX, test $build_ep93xx = yes)
AM_CONDITIONAL(ECOSBOARD, test $build_ecosboard = yes)
+AM_CONDITIONAL(MINIDUMMY, test $build_minidummy = yes)
AM_CONDITIONAL(IOUTIL, test $build_ioutil = yes)
AM_CONDITIONAL(HTTPD, test $build_httpd = yes)
AM_CONDITIONAL(AT91RM9200, test $build_at91rm9200 = yes)
Modified: trunk/src/jtag/Makefile.am
===================================================================
--- trunk/src/jtag/Makefile.am 2009-06-07 05:24:27 UTC (rev 2091)
+++ trunk/src/jtag/Makefile.am 2009-06-07 13:55:29 UTC (rev 2092)
@@ -51,6 +51,12 @@
ECOSBOARDFILES =
endif
+if MINIDUMMY
+MINIDUMMYFILES = minidummy.c
+else
+MINIDUMMYFILES =
+endif
+
if MINIDRIVER
DRIVERFILES =
else
@@ -131,6 +137,7 @@
$(PRESTOFILES) \
$(USBPROGFILES) \
$(ECOSBOARDFILES) \
+ $(MINIDUMMYFILES) \
$(JLINKFILES) \
$(RLINKFILES) \
$(VSLLINKFILES) \
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:24:27 UTC (rev 2091)
+++ trunk/src/jtag/jtag.c 2009-06-07 13:55:29 UTC (rev 2092)
@@ -99,6 +99,9 @@
extern jtag_interface_t zy1000_interface;
#endif
+#if BUILD_MINIDUMMY == 1
+ extern jtag_interface_t minidummy_interface;
+#endif
#if BUILD_PARPORT == 1
extern jtag_interface_t parport_interface;
#endif
@@ -159,6 +162,9 @@
#if BUILD_ECOSBOARD == 1
&zy1000_interface,
#endif
+#if BUILD_MINIDUMMY == 1
+ &minidummy_interface,
+#endif
#if BUILD_PARPORT == 1
&parport_interface,
#endif
@@ -240,7 +246,7 @@
int jtag_tap_count(void)
{
return jtag_num_taps;
-}
+ }
unsigned jtag_tap_count_enabled(void)
{
@@ -1058,12 +1064,12 @@
tap->dotted_name, tap->expected_ids[ii]);
}
return false;
-}
+ }
/* Try to examine chain layout according to IEEE 1149.1 §12
*/
static int jtag_examine_chain(void)
-{
+ {
u8 idcode_buffer[JTAG_MAX_CHAIN_SIZE * 4];
unsigned device_count = 0;
@@ -1087,7 +1093,7 @@
{
/* LSB must not be 0, this indicates a device in bypass */
LOG_WARNING("Tap/Device does not have IDCODE");
- idcode = 0;
+ idcode=0;
bit_count += 1;
}
@@ -1097,9 +1103,9 @@
* End of chain (invalid manufacturer ID) some devices, such
* as AVR will output all 1's instead of TDI input value at
* end of chain.
- */
+ */
if (jtag_idcode_is_final(idcode))
- {
+ {
jtag_examine_chain_end(idcode_buffer,
bit_count + 32, JTAG_MAX_CHAIN_SIZE * 32);
break;
@@ -1115,7 +1121,7 @@
if (!tap)
continue;
- tap->idcode = idcode;
+ tap->idcode = idcode;
// ensure the TAP ID does matches what was expected
if (!jtag_examine_chain_match_tap(tap))
@@ -1478,12 +1484,12 @@
return ERROR_OK;
}
- Jim_SetResult_sprintf(goi->interp,
- "newtap: %s missing required parameters",
- pTap->dotted_name);
+ Jim_SetResult_sprintf( goi->interp,
+ "newtap: %s missing required parameters",
+ pTap->dotted_name);
jtag_tap_free(pTap);
- return JIM_ERR;
-}
+ return JIM_ERR;
+ }
static int jim_jtag_command( Jim_Interp *interp, int argc, Jim_Obj *const *argv )
{
@@ -2133,7 +2139,6 @@
return ERROR_OK;
}
-
static int handle_jtag_speed_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
int retval=ERROR_OK;
@@ -2218,11 +2223,11 @@
tap_state_t state = tap_state_by_name(args[0]);
if (state < 0)
{
- command_print( cmd_ctx, "Invalid state name: %s\n", args[0] );
- return ERROR_COMMAND_SYNTAX_ERROR;
- }
- jtag_set_end_state(state);
- jtag_execute_queue();
+ command_print( cmd_ctx, "Invalid state name: %s\n", args[0] );
+ return ERROR_COMMAND_SYNTAX_ERROR;
+ }
+ jtag_set_end_state(state);
+ jtag_execute_queue();
command_print(cmd_ctx, "current endstate: %s",
tap_state_name(cmd_queue_end_state));
@@ -2571,7 +2576,7 @@
jtag_set_verify(false);
else
return ERROR_COMMAND_SYNTAX_ERROR;
- }
+ }
const char *status = jtag_will_verify() ? "enabled": "disabled";
command_print(cmd_ctx, "verify jtag capture is %s", status);
Added: trunk/src/jtag/minidummy/jtag_minidriver.h
===================================================================
--- trunk/src/jtag/minidummy/jtag_minidriver.h 2009-06-07 05:24:27 UTC (rev 2091)
+++ trunk/src/jtag/minidummy/jtag_minidriver.h 2009-06-07 13:55:29 UTC (rev 2092)
@@ -0,0 +1,43 @@
+/***************************************************************************
+ * Copyright (C) 2007-2008 by vind Harboe *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+
+
+
+static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap,
+ int num_fields,
+ const int *num_bits,
+ const u32 *value,
+ enum tap_state end_state)
+{
+ /* synchronously do the operation here */
+}
+
+static __inline__ void interface_jtag_add_dr_out(jtag_tap_t *target_tap,
+ int num_fields,
+ const int *num_bits,
+ const u32 *value,
+ enum tap_state end_state)
+{
+ /* synchronously do the operation here */
+}
+
+#define interface_jtag_add_callback(callback, in) callback(in)
+
+#define interface_jtag_add_callback4(callback, in, data1, data2, data3) jtag_set_error(callback(in, data1, data2, data3))
Added: trunk/src/jtag/minidummy.c
===================================================================
--- trunk/src/jtag/minidummy.c 2009-06-07 05:24:27 UTC (rev 2091)
+++ trunk/src/jtag/minidummy.c 2009-06-07 13:55:29 UTC (rev 2092)
@@ -0,0 +1,190 @@
+/***************************************************************************
+ * Copyright (C) 2007-2008 by vind Harboe *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "embeddedice.h"
+#include "minidriver.h"
+#include "interface.h"
+
+
+
+
+jtag_interface_t minidummy_interface =
+{
+ .name = "minidummy",
+ .execute_queue = NULL,
+ .speed = NULL,
+ .register_commands = NULL,
+ .init = NULL,
+ .quit = NULL,
+ .khz = NULL,
+ .speed_div = NULL,
+ .power_dropout = NULL,
+ .srst_asserted = NULL,
+};
+
+
+
+
+
+
+int interface_jtag_execute_queue(void)
+{
+ /* synchronously do the operation here */
+
+ return ERROR_OK;
+}
+
+
+
+
+
+extern int jtag_check_value(u8 *captured, void *priv);
+
+int interface_jtag_set_end_state(tap_state_t state)
+{
+ return ERROR_OK;
+}
+
+
+int interface_jtag_add_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
+{
+ /* synchronously do the operation here */
+
+ return ERROR_OK;
+
+}
+
+
+
+
+
+int interface_jtag_add_plain_ir_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
+{
+ /* synchronously do the operation here */
+
+ return ERROR_OK;
+}
+
+/*extern jtag_command_t **jtag_get_last_command_p(void);*/
+
+int interface_jtag_add_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
+{
+ /* synchronously do the operation here */
+
+ return ERROR_OK;
+}
+
+int interface_jtag_add_plain_dr_scan(int num_fields, const scan_field_t *fields, tap_state_t state)
+{
+ /* synchronously do the operation here */
+
+ return ERROR_OK;
+}
+
+
+int interface_jtag_add_tlr()
+{
+ /* synchronously do the operation here */
+
+ return ERROR_OK;
+}
+
+
+
+int interface_jtag_add_reset(int req_trst, int req_srst)
+{
+ /* synchronously do the operation here */
+
+ return ERROR_OK;
+}
+
+
+int interface_jtag_add_runtest(int num_cycles, tap_state_t state)
+{
+ /* synchronously do the operation here */
+
+ return ERROR_OK;
+}
+
+int interface_jtag_add_clocks(int num_cycles)
+{
+ /* synchronously do the operation here */
+
+ return ERROR_OK;
+}
+
+int interface_jtag_add_sleep(u32 us)
+{
+ jtag_sleep(us);
+ return ERROR_OK;
+}
+
+int interface_jtag_add_pathmove(int num_states, const tap_state_t *path)
+{
+ int state_count;
+ int tms = 0;
+
+ state_count = 0;
+
+ tap_state_t cur_state=cmd_queue_cur_state;
+
+ while (num_states)
+ {
+ if (tap_state_transition(cur_state, false) == path[state_count])
+ {
+ tms = 0;
+ }
+ else if (tap_state_transition(cur_state, true) == path[state_count])
+ {
+ tms = 1;
+ }
+ else
+ {
+ LOG_ERROR("BUG: %s -> %s isn't a valid TAP transition", tap_state_name(cur_state), tap_state_name(path[state_count]));
+ exit(-1);
+ }
+
+ /* synchronously do the operation here */
+
+ cur_state = path[state_count];
+ state_count++;
+ num_states--;
+ }
+
+
+ /* synchronously do the operation here */
+
+ return ERROR_OK;
+}
+
+
+
+void embeddedice_write_dcc(jtag_tap_t *tap, int reg_addr, u8 *buffer, int little, int count)
+{
+ int i;
+ for (i = 0; i < count; i++)
+ {
+ embeddedice_write_reg_inner(tap, reg_addr, fast_target_buffer_get_u32(buffer, little));
+ buffer += 4;
+ }
+}
+
|
|
From: <zw...@ma...> - 2009-06-07 07:24:34
|
Author: zwelch
Date: 2009-06-07 07:24:27 +0200 (Sun, 07 Jun 2009)
New Revision: 2091
Modified:
trunk/src/jtag/jtag.c
trunk/src/jtag/jtag.h
Log:
Factoring of jtag_examine_chain for maintainability:
- Improve variable type: change device_count to unsigned.
- Improves jtag_tap_count_enabled() API too (now returns unsigned).
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:24:20 UTC (rev 2090)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:24:27 UTC (rev 2091)
@@ -242,10 +242,10 @@
return jtag_num_taps;
}
-int jtag_tap_count_enabled(void)
+unsigned jtag_tap_count_enabled(void)
{
jtag_tap_t *t;
- int n;
+ unsigned n;
n = 0;
t = jtag_all_taps();
@@ -1065,7 +1065,7 @@
static int jtag_examine_chain(void)
{
u8 idcode_buffer[JTAG_MAX_CHAIN_SIZE * 4];
- int device_count = 0;
+ unsigned device_count = 0;
jtag_examine_chain_execute(idcode_buffer, JTAG_MAX_CHAIN_SIZE);
Modified: trunk/src/jtag/jtag.h
===================================================================
--- trunk/src/jtag/jtag.h 2009-06-07 05:24:20 UTC (rev 2090)
+++ trunk/src/jtag/jtag.h 2009-06-07 05:24:27 UTC (rev 2091)
@@ -181,7 +181,7 @@
extern jtag_tap_t* jtag_tap_by_string(const char* dotted_name);
extern jtag_tap_t* jtag_tap_by_jim_obj(Jim_Interp* interp, Jim_Obj* obj);
extern jtag_tap_t* jtag_tap_by_abs_position(int abs_position);
-extern int jtag_tap_count_enabled(void);
+extern unsigned jtag_tap_count_enabled(void);
extern int jtag_tap_count(void);
static __inline__ jtag_tap_t* jtag_tap_next_enabled(jtag_tap_t* p)
|
|
From: <zw...@ma...> - 2009-06-07 07:24:24
|
Author: zwelch
Date: 2009-06-07 07:24:20 +0200 (Sun, 07 Jun 2009)
New Revision: 2090
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Limit scope: move tap and bit_count variables to point of first use.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:24:12 UTC (rev 2089)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:24:20 UTC (rev 2090)
@@ -1064,9 +1064,7 @@
*/
static int jtag_examine_chain(void)
{
- jtag_tap_t *tap;
u8 idcode_buffer[JTAG_MAX_CHAIN_SIZE * 4];
- int bit_count;
int device_count = 0;
jtag_examine_chain_execute(idcode_buffer, JTAG_MAX_CHAIN_SIZE);
@@ -1075,14 +1073,14 @@
return ERROR_JTAG_INIT_FAILED;
/* point at the 1st tap */
- tap = jtag_tap_next_enabled(NULL);
+ jtag_tap_t *tap = jtag_tap_next_enabled(NULL);
if (tap == NULL)
{
LOG_ERROR("JTAG: No taps enabled?");
return ERROR_JTAG_INIT_FAILED;
}
- for (bit_count = 0; bit_count < (JTAG_MAX_CHAIN_SIZE * 32) - 31;)
+ for (unsigned bit_count = 0; bit_count < (JTAG_MAX_CHAIN_SIZE * 32) - 31;)
{
u32 idcode = buf_get_u32(idcode_buffer, bit_count, 32);
if ((idcode & 1) == 0)
|
|
From: <zw...@ma...> - 2009-06-07 07:24:16
|
Author: zwelch
Date: 2009-06-07 07:24:12 +0200 (Sun, 07 Jun 2009)
New Revision: 2089
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Factor TAP ID matching into new helper function.
- Simplifies the main jtag_examine_chain loop logic considerably.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:24:03 UTC (rev 2088)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:24:12 UTC (rev 2089)
@@ -1021,6 +1021,45 @@
}
}
+static bool jtag_examine_chain_match_tap(const struct jtag_tap_s *tap)
+{
+ if (0 == tap->expected_ids_cnt)
+ {
+ /// @todo Enable LOG_INFO to ask for reports about unknown TAP IDs.
+#if 0
+ LOG_INFO("Uknown JTAG TAP ID: 0x%08x", tap->idcode)
+ LOG_INFO("Please report the chip name and reported ID code to the openocd project");
+#endif
+ return true;
+ }
+
+ /* Loop over the expected identification codes and test for a match */
+ u8 ii;
+ for (ii = 0; ii < tap->expected_ids_cnt; ii++)
+ {
+ if (tap->idcode == tap->expected_ids[ii])
+ break;
+ }
+
+ /* If none of the expected ids matched, log an error */
+ if (ii != tap->expected_ids_cnt)
+ {
+ LOG_INFO("JTAG Tap/device matched");
+ return true;
+ }
+ jtag_examine_chain_display(LOG_LVL_ERROR, "got",
+ tap->dotted_name, tap->idcode);
+ for (ii = 0; ii < tap->expected_ids_cnt; ii++)
+ {
+ char msg[32];
+ snprintf(msg, sizeof(msg), "expected %hhu of %hhu",
+ ii + 1, tap->expected_ids_cnt);
+ jtag_examine_chain_display(LOG_LVL_ERROR, msg,
+ tap->dotted_name, tap->expected_ids[ii]);
+ }
+ return false;
+}
+
/* Try to examine chain layout according to IEEE 1149.1 §12
*/
static int jtag_examine_chain(void)
@@ -1080,42 +1119,11 @@
tap->idcode = idcode;
- if (0 == tap->expected_ids_cnt)
- {
- /// @todo Enable LOG_INFO to ask for reports about unknown TAP IDs.
-#if 0
- LOG_INFO("Uknown JTAG TAP ID: 0x%08x", tap->idcode)
- LOG_INFO("Please report the chip name and reported ID code to the openocd project");
-#endif
- tap = jtag_tap_next_enabled(tap);
- continue;
- }
- /* Loop over the expected identification codes and test for a match */
- u8 ii;
- for (ii = 0; ii < tap->expected_ids_cnt; ii++)
- {
- if (tap->idcode == tap->expected_ids[ii])
- break;
- }
+ // ensure the TAP ID does matches what was expected
+ if (!jtag_examine_chain_match_tap(tap))
+ return ERROR_JTAG_INIT_FAILED;
- /* If none of the expected ids matched, log an error */
- if (ii != tap->expected_ids_cnt)
- {
- LOG_INFO("JTAG Tap/device matched");
- tap = jtag_tap_next_enabled(tap);
- continue;
- }
- jtag_examine_chain_display(LOG_LVL_ERROR, "got",
- tap->dotted_name, tap->idcode);
- for (ii = 0; ii < tap->expected_ids_cnt; ii++)
- {
- char msg[20];
- snprintf(msg, 20, "expected %hhu of %hhu",
- ii + 1, tap->expected_ids_cnt);
- jtag_examine_chain_display(LOG_LVL_ERROR, msg,
- tap->dotted_name, tap->expected_ids[ii]);
- }
- return ERROR_JTAG_INIT_FAILED;
+ tap = jtag_tap_next_enabled(tap);
}
/* see if number of discovered devices matches configuration */
|
|
From: <zw...@ma...> - 2009-06-07 07:24:08
|
Author: zwelch
Date: 2009-06-07 07:24:03 +0200 (Sun, 07 Jun 2009)
New Revision: 2088
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Minor whitespace and style cleanups in body of jtag_examine_chain.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:23:50 UTC (rev 2087)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:24:03 UTC (rev 2088)
@@ -1037,7 +1037,8 @@
/* point at the 1st tap */
tap = jtag_tap_next_enabled(NULL);
- if( tap == NULL ){
+ if (tap == NULL)
+ {
LOG_ERROR("JTAG: No taps enabled?");
return ERROR_JTAG_INIT_FAILED;
}
@@ -1049,7 +1050,7 @@
{
/* LSB must not be 0, this indicates a device in bypass */
LOG_WARNING("Tap/Device does not have IDCODE");
- idcode=0;
+ idcode = 0;
bit_count += 1;
}
@@ -1081,7 +1082,7 @@
if (0 == tap->expected_ids_cnt)
{
- // @todo Enable LOG_INFO to ask for reports about unknown TAP IDs.
+ /// @todo Enable LOG_INFO to ask for reports about unknown TAP IDs.
#if 0
LOG_INFO("Uknown JTAG TAP ID: 0x%08x", tap->idcode)
LOG_INFO("Please report the chip name and reported ID code to the openocd project");
@@ -1089,12 +1090,12 @@
tap = jtag_tap_next_enabled(tap);
continue;
}
- /* Loop over the expected identification codes and test for a match */
+ /* Loop over the expected identification codes and test for a match */
u8 ii;
- for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
- if (tap->idcode == tap->expected_ids[ii]) {
+ for (ii = 0; ii < tap->expected_ids_cnt; ii++)
+ {
+ if (tap->idcode == tap->expected_ids[ii])
break;
- }
}
/* If none of the expected ids matched, log an error */
@@ -1106,7 +1107,8 @@
}
jtag_examine_chain_display(LOG_LVL_ERROR, "got",
tap->dotted_name, tap->idcode);
- for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
+ for (ii = 0; ii < tap->expected_ids_cnt; ii++)
+ {
char msg[20];
snprintf(msg, 20, "expected %hhu of %hhu",
ii + 1, tap->expected_ids_cnt);
@@ -1119,9 +1121,11 @@
/* see if number of discovered devices matches configuration */
if (device_count != jtag_tap_count_enabled())
{
- LOG_ERROR("number of discovered devices in JTAG chain (%i) doesn't match (enabled) configuration (%i), total taps: %d",
- device_count, jtag_tap_count_enabled(), jtag_tap_count());
- LOG_ERROR("check the config file and ensure proper JTAG communication (connections, speed, ...)");
+ LOG_ERROR("number of discovered devices in JTAG chain (%i) "
+ "does not match (enabled) configuration (%i), total taps: %d",
+ device_count, jtag_tap_count_enabled(), jtag_tap_count());
+ LOG_ERROR("check the config file and ensure proper JTAG communication"
+ " (connections, speed, ...)");
return ERROR_JTAG_INIT_FAILED;
}
|
|
From: <zw...@ma...> - 2009-06-07 07:24:00
|
Author: zwelch
Date: 2009-06-07 07:23:50 +0200 (Sun, 07 Jun 2009)
New Revision: 2087
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Add helper to check for the terminating ID during jtag_examine_chain.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:23:40 UTC (rev 2086)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:23:50 UTC (rev 2087)
@@ -995,6 +995,11 @@
EXTRACT_MFG(idcode), EXTRACT_PART(idcode), EXTRACT_VER(idcode) );
}
+static bool jtag_idcode_is_final(u32 idcode)
+{
+ return idcode == 0x000000FF || idcode == 0xFFFFFFFF;
+}
+
/**
* This helper checks that remaining bits in the examined chain data are
* all as expected, but a single JTAG device requires only 64 bits to be
@@ -1008,7 +1013,7 @@
{
u32 idcode = buf_get_u32(idcodes, count, 32);
// do not trigger the warning if the data looks good
- if (!triggered && (idcode == 0x000000FF || idcode == 0xFFFFFFFF))
+ if (!triggered && jtag_idcode_is_final(idcode))
continue;
LOG_WARNING("Unexpected idcode after end of chain: %d 0x%08x",
count, idcode);
@@ -1055,7 +1060,7 @@
* as AVR will output all 1's instead of TDI input value at
* end of chain.
*/
- if ((idcode == 0x000000FF)||(idcode == 0xFFFFFFFF))
+ if (jtag_idcode_is_final(idcode))
{
jtag_examine_chain_end(idcode_buffer,
bit_count + 32, JTAG_MAX_CHAIN_SIZE * 32);
|
|
From: <zw...@ma...> - 2009-06-07 07:23:45
|
Author: zwelch
Date: 2009-06-07 07:23:40 +0200 (Sun, 07 Jun 2009)
New Revision: 2086
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Factor end-of-chain verfication into new helper routine.
- Change 'unexpected' local variable name to 'triggered' and type to bool.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:23:30 UTC (rev 2085)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:23:40 UTC (rev 2086)
@@ -995,6 +995,27 @@
EXTRACT_MFG(idcode), EXTRACT_PART(idcode), EXTRACT_VER(idcode) );
}
+/**
+ * This helper checks that remaining bits in the examined chain data are
+ * all as expected, but a single JTAG device requires only 64 bits to be
+ * read back correctly. This can help identify and diagnose problems
+ * with the JTAG chain earlier, gives more helpful/explicit error messages.
+ */
+static void jtag_examine_chain_end(u8 *idcodes, unsigned count, unsigned max)
+{
+ bool triggered = false;
+ for ( ; count < max - 31; count += 32)
+ {
+ u32 idcode = buf_get_u32(idcodes, count, 32);
+ // do not trigger the warning if the data looks good
+ if (!triggered && (idcode == 0x000000FF || idcode == 0xFFFFFFFF))
+ continue;
+ LOG_WARNING("Unexpected idcode after end of chain: %d 0x%08x",
+ count, idcode);
+ triggered = true;
+ }
+}
+
/* Try to examine chain layout according to IEEE 1149.1 §12
*/
static int jtag_examine_chain(void)
@@ -1029,32 +1050,15 @@
}
else
{
- /* some devices, such as AVR will output all 1's instead of TDI
- input value at end of chain. */
+ /*
+ * End of chain (invalid manufacturer ID) some devices, such
+ * as AVR will output all 1's instead of TDI input value at
+ * end of chain.
+ */
if ((idcode == 0x000000FF)||(idcode == 0xFFFFFFFF))
{
- int unexpected=0;
- /* End of chain (invalid manufacturer ID)
- *
- * The JTAG examine is the very first thing that happens
- *
- * A single JTAG device requires only 64 bits to be read back correctly.
- *
- * The code below adds a check that the rest of the data scanned (640 bits)
- * are all as expected. This helps diagnose/catch problems with the JTAG chain
- *
- * earlier and gives more helpful/explicit error messages.
- */
- for (bit_count += 32; bit_count < (JTAG_MAX_CHAIN_SIZE * 32) - 31;bit_count += 32)
- {
- idcode = buf_get_u32(idcode_buffer, bit_count, 32);
- if (unexpected||((idcode != 0x000000FF)&&(idcode != 0xFFFFFFFF)))
- {
- LOG_WARNING("Unexpected idcode after end of chain! %d 0x%08x", bit_count, idcode);
- unexpected = 1;
- }
- }
-
+ jtag_examine_chain_end(idcode_buffer,
+ bit_count + 32, JTAG_MAX_CHAIN_SIZE * 32);
break;
}
|
|
From: <zw...@ma...> - 2009-06-07 07:23:35
|
Author: zwelch
Date: 2009-06-07 07:23:30 +0200 (Sun, 07 Jun 2009)
New Revision: 2085
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Factor output of accepted/incorrect/expected TAP IDs into static helper.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:23:13 UTC (rev 2084)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:23:30 UTC (rev 2085)
@@ -985,6 +985,16 @@
return true;
}
+static void jtag_examine_chain_display(enum log_levels level, const char *msg,
+ const char *name, u32 idcode)
+{
+ log_printf_lf(level, __FILE__, __LINE__, __FUNCTION__,
+ "JTAG tap: %s %16.16s: 0x%08x "
+ "(mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
+ name, msg, idcode,
+ EXTRACT_MFG(idcode), EXTRACT_PART(idcode), EXTRACT_VER(idcode) );
+}
+
/* Try to examine chain layout according to IEEE 1149.1 §12
*/
static int jtag_examine_chain(void)
@@ -1019,10 +1029,6 @@
}
else
{
- u32 manufacturer;
- u32 part;
- u32 version;
-
/* some devices, such as AVR will output all 1's instead of TDI
input value at end of chain. */
if ((idcode == 0x000000FF)||(idcode == 0xFFFFFFFF))
@@ -1052,14 +1058,10 @@
break;
}
- manufacturer = EXTRACT_MFG(idcode);
- part = EXTRACT_PART(idcode);
- version = EXTRACT_VER(idcode);
+ jtag_examine_chain_display(LOG_LVL_INFO, "tap/device found",
+ tap ? tap->dotted_name : "(not-named)",
+ idcode);
- LOG_INFO("JTAG tap: %s tap/device found: 0x%8.8x (Manufacturer: 0x%3.3x, Part: 0x%4.4x, Version: 0x%1.1x)",
- ((tap != NULL) ? (tap->dotted_name) : "(not-named)"),
- idcode, manufacturer, part, version);
-
bit_count += 32;
}
device_count++;
@@ -1093,21 +1095,14 @@
tap = jtag_tap_next_enabled(tap);
continue;
}
- LOG_ERROR("JTAG tap: %s got: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
- tap->dotted_name,
- idcode,
- EXTRACT_MFG( tap->idcode ),
- EXTRACT_PART( tap->idcode ),
- EXTRACT_VER( tap->idcode ) );
+ jtag_examine_chain_display(LOG_LVL_ERROR, "got",
+ tap->dotted_name, tap->idcode);
for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
- LOG_ERROR("JTAG tap: %s expected %hhu of %hhu: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
- tap->dotted_name,
- ii + 1,
- tap->expected_ids_cnt,
- tap->expected_ids[ii],
- EXTRACT_MFG( tap->expected_ids[ii] ),
- EXTRACT_PART( tap->expected_ids[ii] ),
- EXTRACT_VER( tap->expected_ids[ii] ) );
+ char msg[20];
+ snprintf(msg, 20, "expected %hhu of %hhu",
+ ii + 1, tap->expected_ids_cnt);
+ jtag_examine_chain_display(LOG_LVL_ERROR, msg,
+ tap->dotted_name, tap->expected_ids[ii]);
}
return ERROR_JTAG_INIT_FAILED;
}
|
|
From: <zw...@ma...> - 2009-06-07 07:23:27
|
Author: zwelch
Date: 2009-06-07 07:23:13 +0200 (Sun, 07 Jun 2009)
New Revision: 2084
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Factor initial chain examination check into new static helper.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:23:03 UTC (rev 2083)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:23:13 UTC (rev 2084)
@@ -963,32 +963,41 @@
return jtag_execute_queue();
}
+static bool jtag_examine_chain_check(u8 *idcodes, unsigned count)
+{
+ u8 zero_check = 0x0;
+ u8 one_check = 0xff;
+
+ for (unsigned i = 0; i < count * 4; i++)
+ {
+ zero_check |= idcodes[i];
+ one_check &= idcodes[i];
+ }
+
+ /* if there wasn't a single non-zero bit or if all bits were one,
+ * the scan is not valid */
+ if (zero_check == 0x00 || one_check == 0xff)
+ {
+ LOG_ERROR("JTAG communication failure: check connection, "
+ "JTAG interface, target power etc.");
+ return false;
+ }
+ return true;
+}
+
/* Try to examine chain layout according to IEEE 1149.1 §12
*/
static int jtag_examine_chain(void)
{
jtag_tap_t *tap;
u8 idcode_buffer[JTAG_MAX_CHAIN_SIZE * 4];
- int i;
int bit_count;
int device_count = 0;
- u8 zero_check = 0x0;
- u8 one_check = 0xff;
jtag_examine_chain_execute(idcode_buffer, JTAG_MAX_CHAIN_SIZE);
- for (i = 0; i < JTAG_MAX_CHAIN_SIZE * 4; i++)
- {
- zero_check |= idcode_buffer[i];
- one_check &= idcode_buffer[i];
- }
-
- /* if there wasn't a single non-zero bit or if all bits were one, the scan isn't valid */
- if ((zero_check == 0x00) || (one_check == 0xff))
- {
- LOG_ERROR("JTAG communication failure, check connection, JTAG interface, target power etc.");
+ if (!jtag_examine_chain_check(idcode_buffer, JTAG_MAX_CHAIN_SIZE))
return ERROR_JTAG_INIT_FAILED;
- }
/* point at the 1st tap */
tap = jtag_tap_next_enabled(NULL);
|
|
From: <zw...@ma...> - 2009-06-07 07:23:08
|
Author: zwelch
Date: 2009-06-07 07:23:03 +0200 (Sun, 07 Jun 2009)
New Revision: 2083
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Factor JTAG chain examination into static helper function.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:22:53 UTC (rev 2082)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:23:03 UTC (rev 2083)
@@ -946,12 +946,28 @@
#define EXTRACT_PART(X) (((X) & 0xffff000) >> 12)
#define EXTRACT_VER(X) (((X) & 0xf0000000) >> 28)
+static int jtag_examine_chain_execute(u8 *idcode_buffer, unsigned num_idcode)
+{
+ scan_field_t field = {
+ .tap = NULL,
+ .num_bits = num_idcode * 32,
+ .out_value = idcode_buffer,
+ .in_value = idcode_buffer,
+ };
+
+ // initialize to the end of chain ID value
+ for (unsigned i = 0; i < JTAG_MAX_CHAIN_SIZE; i++)
+ buf_set_u32(idcode_buffer, i * 32, 32, 0x000000FF);
+
+ jtag_add_plain_dr_scan(1, &field, TAP_RESET);
+ return jtag_execute_queue();
+}
+
/* Try to examine chain layout according to IEEE 1149.1 §12
*/
static int jtag_examine_chain(void)
{
jtag_tap_t *tap;
- scan_field_t field;
u8 idcode_buffer[JTAG_MAX_CHAIN_SIZE * 4];
int i;
int bit_count;
@@ -959,23 +975,8 @@
u8 zero_check = 0x0;
u8 one_check = 0xff;
- field.tap = NULL;
- field.num_bits = sizeof(idcode_buffer) * 8;
- field.out_value = idcode_buffer;
+ jtag_examine_chain_execute(idcode_buffer, JTAG_MAX_CHAIN_SIZE);
- field.in_value = idcode_buffer;
-
-
-
-
- for (i = 0; i < JTAG_MAX_CHAIN_SIZE; i++)
- {
- buf_set_u32(idcode_buffer, i * 32, 32, 0x000000FF);
- }
-
- jtag_add_plain_dr_scan(1, &field, TAP_RESET);
- jtag_execute_queue();
-
for (i = 0; i < JTAG_MAX_CHAIN_SIZE * 4; i++)
{
zero_check |= idcode_buffer[i];
|
|
From: <zw...@ma...> - 2009-06-07 07:23:00
|
Author: zwelch
Date: 2009-06-07 07:22:53 +0200 (Sun, 07 Jun 2009)
New Revision: 2082
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Reduce indent: invert logical test of expected_id count.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:22:42 UTC (rev 2081)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:22:53 UTC (rev 2082)
@@ -1077,30 +1077,29 @@
}
/* If none of the expected ids matched, log an error */
- if (ii == tap->expected_ids_cnt) {
- LOG_ERROR("JTAG tap: %s got: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
- tap->dotted_name,
- idcode,
- EXTRACT_MFG( tap->idcode ),
- EXTRACT_PART( tap->idcode ),
- EXTRACT_VER( tap->idcode ) );
- for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
- LOG_ERROR("JTAG tap: %s expected %hhu of %hhu: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
- tap->dotted_name,
- ii + 1,
- tap->expected_ids_cnt,
- tap->expected_ids[ii],
- EXTRACT_MFG( tap->expected_ids[ii] ),
- EXTRACT_PART( tap->expected_ids[ii] ),
- EXTRACT_VER( tap->expected_ids[ii] ) );
- }
-
- return ERROR_JTAG_INIT_FAILED;
- } else {
+ if (ii != tap->expected_ids_cnt)
+ {
LOG_INFO("JTAG Tap/device matched");
+ tap = jtag_tap_next_enabled(tap);
+ continue;
}
-
- tap = jtag_tap_next_enabled(tap);
+ LOG_ERROR("JTAG tap: %s got: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
+ tap->dotted_name,
+ idcode,
+ EXTRACT_MFG( tap->idcode ),
+ EXTRACT_PART( tap->idcode ),
+ EXTRACT_VER( tap->idcode ) );
+ for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
+ LOG_ERROR("JTAG tap: %s expected %hhu of %hhu: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
+ tap->dotted_name,
+ ii + 1,
+ tap->expected_ids_cnt,
+ tap->expected_ids[ii],
+ EXTRACT_MFG( tap->expected_ids[ii] ),
+ EXTRACT_PART( tap->expected_ids[ii] ),
+ EXTRACT_VER( tap->expected_ids[ii] ) );
+ }
+ return ERROR_JTAG_INIT_FAILED;
}
/* see if number of discovered devices matches configuration */
|
|
From: <zw...@ma...> - 2009-06-07 07:22:50
|
Author: zwelch
Date: 2009-06-07 07:22:42 +0200 (Sun, 07 Jun 2009)
New Revision: 2081
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Reduce indent: invert logic test for unexpected TAP (no IDs).
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:22:34 UTC (rev 2080)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:22:42 UTC (rev 2081)
@@ -1058,44 +1058,48 @@
tap->idcode = idcode;
- if (tap->expected_ids_cnt > 0) {
+ if (0 == tap->expected_ids_cnt)
+ {
+ // @todo Enable LOG_INFO to ask for reports about unknown TAP IDs.
+#if 0
+ LOG_INFO("Uknown JTAG TAP ID: 0x%08x", tap->idcode)
+ LOG_INFO("Please report the chip name and reported ID code to the openocd project");
+#endif
+ tap = jtag_tap_next_enabled(tap);
+ continue;
+ }
/* Loop over the expected identification codes and test for a match */
- u8 ii;
- for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
- if( tap->idcode == tap->expected_ids[ii] ){
- break;
- }
+ u8 ii;
+ for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
+ if (tap->idcode == tap->expected_ids[ii]) {
+ break;
}
+ }
- /* If none of the expected ids matched, log an error */
- if (ii == tap->expected_ids_cnt) {
- LOG_ERROR("JTAG tap: %s got: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
+ /* If none of the expected ids matched, log an error */
+ if (ii == tap->expected_ids_cnt) {
+ LOG_ERROR("JTAG tap: %s got: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
+ tap->dotted_name,
+ idcode,
+ EXTRACT_MFG( tap->idcode ),
+ EXTRACT_PART( tap->idcode ),
+ EXTRACT_VER( tap->idcode ) );
+ for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
+ LOG_ERROR("JTAG tap: %s expected %hhu of %hhu: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
tap->dotted_name,
- idcode,
- EXTRACT_MFG( tap->idcode ),
- EXTRACT_PART( tap->idcode ),
- EXTRACT_VER( tap->idcode ) );
- for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
- LOG_ERROR("JTAG tap: %s expected %hhu of %hhu: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
- tap->dotted_name,
- ii + 1,
- tap->expected_ids_cnt,
- tap->expected_ids[ii],
- EXTRACT_MFG( tap->expected_ids[ii] ),
- EXTRACT_PART( tap->expected_ids[ii] ),
- EXTRACT_VER( tap->expected_ids[ii] ) );
- }
+ ii + 1,
+ tap->expected_ids_cnt,
+ tap->expected_ids[ii],
+ EXTRACT_MFG( tap->expected_ids[ii] ),
+ EXTRACT_PART( tap->expected_ids[ii] ),
+ EXTRACT_VER( tap->expected_ids[ii] ) );
+ }
- return ERROR_JTAG_INIT_FAILED;
- } else {
- LOG_INFO("JTAG Tap/device matched");
- }
+ return ERROR_JTAG_INIT_FAILED;
} else {
-#if 0
- LOG_INFO("JTAG TAP ID: 0x%08x - Unknown - please report (A) chipname and (B) idcode to the openocd project",
- tap->idcode);
-#endif
+ LOG_INFO("JTAG Tap/device matched");
}
+
tap = jtag_tap_next_enabled(tap);
}
|
|
From: <zw...@ma...> - 2009-06-07 07:22:38
|
Author: zwelch
Date: 2009-06-07 07:22:34 +0200 (Sun, 07 Jun 2009)
New Revision: 2080
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Reduce indent: invert logic test for tap in jtag_examine_chain.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 05:22:25 UTC (rev 2079)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:22:34 UTC (rev 2080)
@@ -1052,51 +1052,51 @@
bit_count += 32;
}
- if (tap)
- {
- tap->idcode = idcode;
+ device_count++;
+ if (!tap)
+ continue;
- if (tap->expected_ids_cnt > 0) {
- /* Loop over the expected identification codes and test for a match */
- u8 ii;
- for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
- if( tap->idcode == tap->expected_ids[ii] ){
- break;
- }
+ tap->idcode = idcode;
+
+ if (tap->expected_ids_cnt > 0) {
+ /* Loop over the expected identification codes and test for a match */
+ u8 ii;
+ for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
+ if( tap->idcode == tap->expected_ids[ii] ){
+ break;
}
+ }
- /* If none of the expected ids matched, log an error */
- if (ii == tap->expected_ids_cnt) {
- LOG_ERROR("JTAG tap: %s got: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
+ /* If none of the expected ids matched, log an error */
+ if (ii == tap->expected_ids_cnt) {
+ LOG_ERROR("JTAG tap: %s got: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
+ tap->dotted_name,
+ idcode,
+ EXTRACT_MFG( tap->idcode ),
+ EXTRACT_PART( tap->idcode ),
+ EXTRACT_VER( tap->idcode ) );
+ for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
+ LOG_ERROR("JTAG tap: %s expected %hhu of %hhu: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
tap->dotted_name,
- idcode,
- EXTRACT_MFG( tap->idcode ),
- EXTRACT_PART( tap->idcode ),
- EXTRACT_VER( tap->idcode ) );
- for (ii = 0; ii < tap->expected_ids_cnt; ii++) {
- LOG_ERROR("JTAG tap: %s expected %hhu of %hhu: 0x%08x (mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
- tap->dotted_name,
- ii + 1,
- tap->expected_ids_cnt,
- tap->expected_ids[ii],
- EXTRACT_MFG( tap->expected_ids[ii] ),
- EXTRACT_PART( tap->expected_ids[ii] ),
- EXTRACT_VER( tap->expected_ids[ii] ) );
- }
+ ii + 1,
+ tap->expected_ids_cnt,
+ tap->expected_ids[ii],
+ EXTRACT_MFG( tap->expected_ids[ii] ),
+ EXTRACT_PART( tap->expected_ids[ii] ),
+ EXTRACT_VER( tap->expected_ids[ii] ) );
+ }
- return ERROR_JTAG_INIT_FAILED;
- } else {
- LOG_INFO("JTAG Tap/device matched");
- }
+ return ERROR_JTAG_INIT_FAILED;
} else {
+ LOG_INFO("JTAG Tap/device matched");
+ }
+ } else {
#if 0
- LOG_INFO("JTAG TAP ID: 0x%08x - Unknown - please report (A) chipname and (B) idcode to the openocd project",
- tap->idcode);
+ LOG_INFO("JTAG TAP ID: 0x%08x - Unknown - please report (A) chipname and (B) idcode to the openocd project",
+ tap->idcode);
#endif
- }
- tap = jtag_tap_next_enabled(tap);
}
- device_count++;
+ tap = jtag_tap_next_enabled(tap);
}
/* see if number of discovered devices matches configuration */
|
|
From: <zw...@ma...> - 2009-06-07 07:22:31
|
Author: zwelch Date: 2009-06-07 07:22:25 +0200 (Sun, 07 Jun 2009) New Revision: 2079 Modified: trunk/src/jtag/jtag.c Log: Factoring of jtag_examine_chain for maintainability: - Move definition of maximum JTAG chain size closer to its only uses. Modified: trunk/src/jtag/jtag.c =================================================================== --- trunk/src/jtag/jtag.c 2009-06-07 05:22:09 UTC (rev 2078) +++ trunk/src/jtag/jtag.c 2009-06-07 05:22:25 UTC (rev 2079) @@ -84,10 +84,6 @@ static int jtag_nsrst_delay = 0; /* default to no nSRST delay */ static int jtag_ntrst_delay = 0; /* default to no nTRST delay */ -/* maximum number of JTAG devices expected in the chain - */ -#define JTAG_MAX_CHAIN_SIZE 20 - /* callbacks to inform high-level handlers about JTAG state changes */ jtag_event_callback_t *jtag_event_callbacks; @@ -943,6 +939,9 @@ alive_sleep(us/1000); } +/// maximum number of JTAG devices expected in the chain +#define JTAG_MAX_CHAIN_SIZE 20 + #define EXTRACT_MFG(X) (((X) & 0xffe) >> 1) #define EXTRACT_PART(X) (((X) & 0xffff000) >> 12) #define EXTRACT_VER(X) (((X) & 0xf0000000) >> 28) |
|
From: <zw...@ma...> - 2009-06-07 07:22:23
|
Author: zwelch
Date: 2009-06-07 07:22:09 +0200 (Sun, 07 Jun 2009)
New Revision: 2078
Modified:
trunk/src/jtag/jtag.c
Log:
Factoring of jtag_examine_chain for maintainability:
- Move JTAG EXTRACT macros out from the middle of jtag_examine_chain.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-07 03:48:21 UTC (rev 2077)
+++ trunk/src/jtag/jtag.c 2009-06-07 05:22:09 UTC (rev 2078)
@@ -943,6 +943,10 @@
alive_sleep(us/1000);
}
+#define EXTRACT_MFG(X) (((X) & 0xffe) >> 1)
+#define EXTRACT_PART(X) (((X) & 0xffff000) >> 12)
+#define EXTRACT_VER(X) (((X) & 0xf0000000) >> 28)
+
/* Try to examine chain layout according to IEEE 1149.1 §12
*/
static int jtag_examine_chain(void)
@@ -1039,11 +1043,8 @@
break;
}
-#define EXTRACT_MFG(X) (((X) & 0xffe) >> 1)
manufacturer = EXTRACT_MFG(idcode);
-#define EXTRACT_PART(X) (((X) & 0xffff000) >> 12)
part = EXTRACT_PART(idcode);
-#define EXTRACT_VER(X) (((X) & 0xf0000000) >> 28)
version = EXTRACT_VER(idcode);
LOG_INFO("JTAG tap: %s tap/device found: 0x%8.8x (Manufacturer: 0x%3.3x, Part: 0x%4.4x, Version: 0x%1.1x)",
|
|
From: <zw...@ma...> - 2009-06-07 05:48:26
|
Author: zwelch
Date: 2009-06-07 05:48:21 +0200 (Sun, 07 Jun 2009)
New Revision: 2077
Modified:
trunk/src/jtag/jtag.c
Log:
Clean up handle_endstate_command():
- Merge declaration of state with first use.
- Unindent and remove unnecessary 'else' block.
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-05 12:58:39 UTC (rev 2076)
+++ trunk/src/jtag/jtag.c 2009-06-07 03:48:21 UTC (rev 2077)
@@ -2185,24 +2185,21 @@
static int handle_endstate_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
- tap_state_t state;
-
if (argc < 1)
+ return ERROR_COMMAND_SYNTAX_ERROR;
+
+ tap_state_t state = tap_state_by_name(args[0]);
+ if (state < 0)
{
+ command_print( cmd_ctx, "Invalid state name: %s\n", args[0] );
return ERROR_COMMAND_SYNTAX_ERROR;
}
- else
- {
- state = tap_state_by_name( args[0] );
- if( state < 0 ){
- command_print( cmd_ctx, "Invalid state name: %s\n", args[0] );
- return ERROR_COMMAND_SYNTAX_ERROR;
- }
- jtag_set_end_state(state);
- jtag_execute_queue();
- }
- command_print(cmd_ctx, "current endstate: %s", tap_state_name(cmd_queue_end_state));
+ jtag_set_end_state(state);
+ jtag_execute_queue();
+ command_print(cmd_ctx, "current endstate: %s",
+ tap_state_name(cmd_queue_end_state));
+
return ERROR_OK;
}
|
|
From: oharboe at B. <oh...@ma...> - 2009-06-05 14:58:40
|
Author: oharboe
Date: 2009-06-05 14:58:39 +0200 (Fri, 05 Jun 2009)
New Revision: 2076
Modified:
zy1000/trunk/build/makephi.sh
Log:
install only data files during rom image build
Modified: zy1000/trunk/build/makephi.sh
===================================================================
--- zy1000/trunk/build/makephi.sh 2009-06-05 08:35:24 UTC (rev 2075)
+++ zy1000/trunk/build/makephi.sh 2009-06-05 12:58:39 UTC (rev 2076)
@@ -5,8 +5,8 @@
find tclconvert -regex ".*\.svn" -exec echo rm -rf {} \; | sh
#sh $OPENOCD/html2tcl.tcl tclconvert
find tclconvert/ -type f -exec $OPENOCD/html2tcl.tcl {} {} \;
-make -s
-make -s install
+make -s install-data-am
+
# copy over installed stuff
cp -r /tmp/ecosboard/ocdinstall/lib/openocd/* tclconvert/
# Create rom filing system
|
|
From: oharboe at B. <oh...@ma...> - 2009-06-05 10:35:25
|
Author: oharboe Date: 2009-06-05 10:35:24 +0200 (Fri, 05 Jun 2009) New Revision: 2075 Modified: trunk/tcl/target/at91rm9200.cfg Log: David Brownell <da...@pa...> target/at91rm9200.cfg cleanup Modified: trunk/tcl/target/at91rm9200.cfg =================================================================== --- trunk/tcl/target/at91rm9200.cfg 2009-06-05 06:43:09 UTC (rev 2074) +++ trunk/tcl/target/at91rm9200.cfg 2009-06-05 08:35:24 UTC (rev 2075) @@ -1,3 +1,5 @@ +# Atmel AT91rm9200 +# http://atmel.com/products/at91/ reset_config trst_and_srst @@ -21,31 +23,27 @@ # Never allow the following! if { $_CPUTAPID == 0x15b0203f } { - puts "-------------------------------------------------------" - puts "- ERROR: -" - puts "- ERROR: TapID 0x15b0203f is wrong for at91rm9200 -" - puts "- ERROR: The chip/board has a JTAG select pin/jumper -" - puts "- ERROR: -" - puts "- ERROR: In one position (0x05b0203f) it selects the -" - puts "- ERROR: ARM CPU, in the other position (0x1b0203f) -" - puts "- ERROR: it selects boundry-scan not the ARM -" - puts "- ERROR: -" - puts "-------------------------------------------------------" + echo "-------------------------------------------------------" + echo "- ERROR: -" + echo "- ERROR: TapID 0x15b0203f is wrong for at91rm9200 -" + echo "- ERROR: The chip/board has a JTAG select pin/jumper -" + echo "- ERROR: -" + echo "- ERROR: In one position (0x05b0203f) it selects the -" + echo "- ERROR: ARM CPU, in the other position (0x1b0203f) -" + echo "- ERROR: it selects boundry-scan not the ARM -" + echo "- ERROR: -" + echo "-------------------------------------------------------" } jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID - # Create the GDB Target. -set _TARGETNAME [format "%s.cpu" $_CHIPNAME] +set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME arm920t -endian $_ENDIAN -chain-position $_TARGETNAME + # AT91RM9200 has a 16K block of sram @ 0x0020.0000 -$_TARGETNAME configure -work-area-virt 0x00200000 -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 1 +$_TARGETNAME configure -work-area-virt 0x00200000 -work-area-phys 0x00200000 \ + -work-area-size 0x4000 -work-area-backup 1 # This chip has a DCC ... use it arm7_9 dcc_downloads enable - - - - - |
|
From: oharboe at B. <oh...@ma...> - 2009-06-05 08:43:10
|
Author: oharboe Date: 2009-06-05 08:43:09 +0200 (Fri, 05 Jun 2009) New Revision: 2074 Removed: zy1000/trunk/build/include/getopt.h zy1000/trunk/build/include/inttypes.h zy1000/trunk/build/include/strings.h zy1000/trunk/build/include/sys/ Modified: trunk/src/helper/system.h Log: remove hacks no longer required to build OpenOCD w/eCos Modified: trunk/src/helper/system.h =================================================================== --- trunk/src/helper/system.h 2009-06-05 06:42:20 UTC (rev 2073) +++ trunk/src/helper/system.h 2009-06-05 06:43:09 UTC (rev 2074) @@ -59,6 +59,14 @@ #ifdef HAVE_SYS_POLL_H #include <sys/poll.h> #endif + +#ifdef __ECOS +/* missing from eCos */ +#ifndef EFAULT +#define EFAULT 14 /* Bad address */ +#endif +#endif + #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif Deleted: zy1000/trunk/build/include/getopt.h =================================================================== --- zy1000/trunk/build/include/getopt.h 2009-06-05 06:42:20 UTC (rev 2073) +++ zy1000/trunk/build/include/getopt.h 2009-06-05 06:43:09 UTC (rev 2074) @@ -1 +0,0 @@ -/* An empty file to avoid having to modify OpenOCD */ Deleted: zy1000/trunk/build/include/inttypes.h =================================================================== --- zy1000/trunk/build/include/inttypes.h 2009-06-05 06:42:20 UTC (rev 2073) +++ zy1000/trunk/build/include/inttypes.h 2009-06-05 06:43:09 UTC (rev 2074) @@ -1,7 +0,0 @@ -// does not come w/eCos so we have this placeholder include file to avoid changing OpenOCD too much -#define PRId64 "lld" -#define PRIi64 "lli" -#define PRIo64 "llo" -#define PRIu64 "llu" -#define PRIx64 "llx" -#define PRIX64 "llX" Deleted: zy1000/trunk/build/include/strings.h =================================================================== --- zy1000/trunk/build/include/strings.h 2009-06-05 06:42:20 UTC (rev 2073) +++ zy1000/trunk/build/include/strings.h 2009-06-05 06:43:09 UTC (rev 2074) @@ -1 +0,0 @@ -/* An empty file to avoid having to modify OpenOCD */ |
|
From: oharboe at B. <oh...@ma...> - 2009-06-05 08:42:22
|
Author: oharboe Date: 2009-06-05 08:42:20 +0200 (Fri, 05 Jun 2009) New Revision: 2073 Modified: trunk/src/ecosboard.c Log: remove unused include file: strings.h Modified: trunk/src/ecosboard.c =================================================================== --- trunk/src/ecosboard.c 2009-06-05 06:41:54 UTC (rev 2072) +++ trunk/src/ecosboard.c 2009-06-05 06:42:20 UTC (rev 2073) @@ -39,7 +39,6 @@ #include <time_support.h> #include <sys/time.h> -#include <strings.h> #include <stdio.h> #include <stdlib.h> #include <string.h> |
|
From: oharboe at B. <oh...@ma...> - 2009-06-05 08:41:58
|
Author: oharboe
Date: 2009-06-05 08:41:54 +0200 (Fri, 05 Jun 2009)
New Revision: 2072
Modified:
trunk/src/flash/flash.c
trunk/src/flash/nand.c
trunk/src/helper/ioutil.c
trunk/src/target/trace.c
Log:
remove unused include file: inttypes.h
Modified: trunk/src/flash/flash.c
===================================================================
--- trunk/src/flash/flash.c 2009-06-05 06:37:21 UTC (rev 2071)
+++ trunk/src/flash/flash.c 2009-06-05 06:41:54 UTC (rev 2072)
@@ -31,8 +31,6 @@
#include "image.h"
#include "time_support.h"
-#include <inttypes.h>
-
/* command handlers */
static int handle_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
static int handle_flash_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
Modified: trunk/src/flash/nand.c
===================================================================
--- trunk/src/flash/nand.c 2009-06-05 06:37:21 UTC (rev 2071)
+++ trunk/src/flash/nand.c 2009-06-05 06:41:54 UTC (rev 2072)
@@ -28,9 +28,6 @@
#include "time_support.h"
#include "fileio.h"
-#include <inttypes.h>
-
-
static int handle_nand_list_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
static int handle_nand_probe_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
static int handle_nand_check_bad_blocks_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
Modified: trunk/src/helper/ioutil.c
===================================================================
--- trunk/src/helper/ioutil.c 2009-06-05 06:37:21 UTC (rev 2071)
+++ trunk/src/helper/ioutil.c 2009-06-05 06:41:54 UTC (rev 2072)
@@ -55,9 +55,6 @@
#include <malloc.h>
#endif
#endif
-//#ifdef HAVE_STRINGS_H
-//#include <strings.h>
-//#endif
int handle_rm_command(struct command_context_s *cmd_ctx, char *cmd,
Modified: trunk/src/target/trace.c
===================================================================
--- trunk/src/target/trace.c 2009-06-05 06:37:21 UTC (rev 2071)
+++ trunk/src/target/trace.c 2009-06-05 06:41:54 UTC (rev 2072)
@@ -25,8 +25,6 @@
#include "trace.h"
#include "target.h"
-#include <inttypes.h>
-
int trace_point(target_t *target, u32 number)
{
trace_t *trace = target->trace_info;
|
|
From: oharboe at B. <oh...@ma...> - 2009-06-05 08:37:24
|
Author: oharboe Date: 2009-06-05 08:37:21 +0200 (Fri, 05 Jun 2009) New Revision: 2071 Modified: trunk/src/target/target.c Log: remove unused include file: inttypes.h Modified: trunk/src/target/target.c =================================================================== --- trunk/src/target/target.c 2009-06-05 06:26:02 UTC (rev 2070) +++ trunk/src/target/target.c 2009-06-05 06:37:21 UTC (rev 2071) @@ -42,9 +42,7 @@ #include "image.h" #include "jtag.h" -#include <inttypes.h> - static int handle_targets_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); static int handle_reg_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc); |
|
From: oharboe at B. <oh...@ma...> - 2009-06-05 08:26:05
|
Author: oharboe
Date: 2009-06-05 08:26:02 +0200 (Fri, 05 Jun 2009)
New Revision: 2070
Modified:
zy1000/trunk/build/include/jtag_minidriver.h
Log:
keep up with jtag_tap_next_enabled name change
Modified: zy1000/trunk/build/include/jtag_minidriver.h
===================================================================
--- zy1000/trunk/build/include/jtag_minidriver.h 2009-06-05 00:43:43 UTC (rev 2069)
+++ zy1000/trunk/build/include/jtag_minidriver.h 2009-06-05 06:26:02 UTC (rev 2070)
@@ -157,9 +157,9 @@
enum tap_state pause_state = TAP_DRSHIFT;
jtag_tap_t *tap, *nextTap;
- for(tap = jtag_NextEnabledTap(NULL); tap!= NULL; tap=nextTap)
+ for(tap = jtag_tap_next_enabled(NULL); tap!= NULL; tap=nextTap)
{
- nextTap=jtag_NextEnabledTap(tap);
+ nextTap=jtag_tap_next_enabled(tap);
if (nextTap==NULL)
{
pause_state = end_state;
@@ -187,7 +187,7 @@
enum tap_state end_state)
{
- int singletap=(jtag_NextEnabledTap(jtag_NextEnabledTap(NULL))==NULL);
+ int singletap=(jtag_tap_next_enabled(jtag_tap_next_enabled(NULL))==NULL);
if ((singletap)&&(num_fields==3))
{
/* used by embeddedice_write_reg_inner() */
|
|
From: <zw...@ma...> - 2009-06-05 02:44:09
|
Author: zwelch
Date: 2009-06-05 02:43:43 +0200 (Fri, 05 Jun 2009)
New Revision: 2069
Modified:
trunk/src/jtag/jtag.c
trunk/src/jtag/jtag.h
trunk/src/jtag/jtag_driver.c
trunk/src/jtag/zy1000.c
Log:
Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_NextEnabledTap' as 'jtag_tap_next_enabled.'
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-05 00:43:32 UTC (rev 2068)
+++ trunk/src/jtag/jtag.c 2009-06-05 00:43:43 UTC (rev 2069)
@@ -987,7 +987,7 @@
}
/* point at the 1st tap */
- tap = jtag_NextEnabledTap(NULL);
+ tap = jtag_tap_next_enabled(NULL);
if( tap == NULL ){
LOG_ERROR("JTAG: No taps enabled?");
return ERROR_JTAG_INIT_FAILED;
@@ -1094,7 +1094,7 @@
tap->idcode);
#endif
}
- tap = jtag_NextEnabledTap(tap);
+ tap = jtag_tap_next_enabled(tap);
}
device_count++;
}
@@ -1122,7 +1122,7 @@
tap = NULL;
total_ir_length = 0;
for(;;){
- tap = jtag_NextEnabledTap(tap);
+ tap = jtag_tap_next_enabled(tap);
if( tap == NULL ){
break;
}
@@ -1146,7 +1146,7 @@
chain_pos = 0;
int val;
for(;;){
- tap = jtag_NextEnabledTap(tap);
+ tap = jtag_tap_next_enabled(tap);
if( tap == NULL ){
break;
}
@@ -1677,7 +1677,7 @@
LOG_DEBUG("Init JTAG chain");
- tap = jtag_NextEnabledTap(NULL);
+ tap = jtag_tap_next_enabled(NULL);
if( tap == NULL ){
LOG_ERROR("There are no enabled taps?");
return ERROR_JTAG_INIT_FAILED;
Modified: trunk/src/jtag/jtag.h
===================================================================
--- trunk/src/jtag/jtag.h 2009-06-05 00:43:32 UTC (rev 2068)
+++ trunk/src/jtag/jtag.h 2009-06-05 00:43:43 UTC (rev 2069)
@@ -184,7 +184,7 @@
extern int jtag_tap_count_enabled(void);
extern int jtag_tap_count(void);
-static __inline__ jtag_tap_t* jtag_NextEnabledTap(jtag_tap_t* p)
+static __inline__ jtag_tap_t* jtag_tap_next_enabled(jtag_tap_t* p)
{
if (p == NULL)
{
Modified: trunk/src/jtag/jtag_driver.c
===================================================================
--- trunk/src/jtag/jtag_driver.c 2009-06-05 00:43:32 UTC (rev 2068)
+++ trunk/src/jtag/jtag_driver.c 2009-06-05 00:43:43 UTC (rev 2069)
@@ -96,7 +96,7 @@
/* loop over all enabled TAPs */
- for (jtag_tap_t * tap = jtag_NextEnabledTap(NULL); tap != NULL; tap = jtag_NextEnabledTap(tap))
+ for (jtag_tap_t * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap))
{
/* search the input field list for fields for the current TAP */
@@ -138,7 +138,7 @@
field++;
}
- assert(field == out_fields + num_taps); /* paranoia: jtag_tap_count_enabled() and jtag_NextEnabledTap() not in sync */
+ assert(field == out_fields + num_taps); /* paranoia: jtag_tap_count_enabled() and jtag_tap_next_enabled() not in sync */
return ERROR_OK;
}
@@ -182,7 +182,7 @@
size_t bypass_devices = 0;
- for (jtag_tap_t * tap = jtag_NextEnabledTap(NULL); tap != NULL; tap = jtag_NextEnabledTap(tap))
+ for (jtag_tap_t * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap))
{
if (tap->bypass)
bypass_devices++;
@@ -207,7 +207,7 @@
/* loop over all enabled TAPs */
- for (jtag_tap_t * tap = jtag_NextEnabledTap(NULL); tap != NULL; tap = jtag_NextEnabledTap(tap))
+ for (jtag_tap_t * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap))
{
/* if TAP is not bypassed insert matching input fields */
@@ -271,7 +271,7 @@
size_t bypass_devices = 0;
- for (jtag_tap_t * tap = jtag_NextEnabledTap(NULL); tap != NULL; tap = jtag_NextEnabledTap(tap))
+ for (jtag_tap_t * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap))
{
if (tap->bypass)
bypass_devices++;
@@ -299,7 +299,7 @@
/* loop over all enabled TAPs */
- for (jtag_tap_t * tap = jtag_NextEnabledTap(NULL); tap != NULL; tap = jtag_NextEnabledTap(tap))
+ for (jtag_tap_t * tap = jtag_tap_next_enabled(NULL); tap != NULL; tap = jtag_tap_next_enabled(tap))
{
/* if TAP is not bypassed insert matching input fields */
Modified: trunk/src/jtag/zy1000.c
===================================================================
--- trunk/src/jtag/zy1000.c 2009-06-05 00:43:32 UTC (rev 2068)
+++ trunk/src/jtag/zy1000.c 2009-06-05 00:43:43 UTC (rev 2069)
@@ -511,9 +511,9 @@
int j;
int scan_size = 0;
jtag_tap_t *tap, *nextTap;
- for(tap = jtag_NextEnabledTap(NULL); tap!= NULL; tap=nextTap)
+ for(tap = jtag_tap_next_enabled(NULL); tap!= NULL; tap=nextTap)
{
- nextTap=jtag_NextEnabledTap(tap);
+ nextTap=jtag_tap_next_enabled(tap);
tap_state_t end_state;
if (nextTap==NULL)
{
@@ -580,9 +580,9 @@
int j;
jtag_tap_t *tap, *nextTap;
- for(tap = jtag_NextEnabledTap(NULL); tap!= NULL; tap=nextTap)
+ for(tap = jtag_tap_next_enabled(NULL); tap!= NULL; tap=nextTap)
{
- nextTap=jtag_NextEnabledTap(tap);
+ nextTap=jtag_tap_next_enabled(tap);
int found=0;
tap_state_t end_state;
if (nextTap==NULL)
@@ -749,7 +749,7 @@
{
// static int const reg_addr=0x5;
tap_state_t end_state=jtag_get_end_state();
- if (jtag_NextEnabledTap(jtag_NextEnabledTap(NULL))==NULL)
+ if (jtag_tap_next_enabled(jtag_tap_next_enabled(NULL))==NULL)
{
/* better performance via code duplication */
if (little)
|
|
From: <zw...@ma...> - 2009-06-05 02:43:56
|
Author: zwelch
Date: 2009-06-05 02:43:32 +0200 (Fri, 05 Jun 2009)
New Revision: 2068
Modified:
trunk/src/jtag/jtag.c
trunk/src/jtag/jtag.h
trunk/src/jtag/jtag_driver.c
Log:
Eliminate MixedCaps symbol from public JTAG TAP API:
- Purely mechanical transformations to the source files.
- Rename 'jtag_NumEnabledTaps' as 'jtag_tap_count_enabled.'
Modified: trunk/src/jtag/jtag.c
===================================================================
--- trunk/src/jtag/jtag.c 2009-06-05 00:43:23 UTC (rev 2067)
+++ trunk/src/jtag/jtag.c 2009-06-05 00:43:32 UTC (rev 2068)
@@ -246,7 +246,7 @@
return jtag_num_taps;
}
-int jtag_NumEnabledTaps(void)
+int jtag_tap_count_enabled(void)
{
jtag_tap_t *t;
int n;
@@ -1100,10 +1100,10 @@
}
/* see if number of discovered devices matches configuration */
- if (device_count != jtag_NumEnabledTaps())
+ if (device_count != jtag_tap_count_enabled())
{
LOG_ERROR("number of discovered devices in JTAG chain (%i) doesn't match (enabled) configuration (%i), total taps: %d",
- device_count, jtag_NumEnabledTaps(), jtag_tap_count());
+ device_count, jtag_tap_count_enabled(), jtag_tap_count());
LOG_ERROR("check the config file and ensure proper JTAG communication (connections, speed, ...)");
return ERROR_JTAG_INIT_FAILED;
}
Modified: trunk/src/jtag/jtag.h
===================================================================
--- trunk/src/jtag/jtag.h 2009-06-05 00:43:23 UTC (rev 2067)
+++ trunk/src/jtag/jtag.h 2009-06-05 00:43:32 UTC (rev 2068)
@@ -181,7 +181,7 @@
extern jtag_tap_t* jtag_tap_by_string(const char* dotted_name);
extern jtag_tap_t* jtag_tap_by_jim_obj(Jim_Interp* interp, Jim_Obj* obj);
extern jtag_tap_t* jtag_tap_by_abs_position(int abs_position);
-extern int jtag_NumEnabledTaps(void);
+extern int jtag_tap_count_enabled(void);
extern int jtag_tap_count(void);
static __inline__ jtag_tap_t* jtag_NextEnabledTap(jtag_tap_t* p)
Modified: trunk/src/jtag/jtag_driver.c
===================================================================
--- trunk/src/jtag/jtag_driver.c 2009-06-05 00:43:23 UTC (rev 2067)
+++ trunk/src/jtag/jtag_driver.c 2009-06-05 00:43:32 UTC (rev 2068)
@@ -75,7 +75,7 @@
*/
int interface_jtag_add_ir_scan(int in_num_fields, const scan_field_t *in_fields, tap_state_t state)
{
- size_t num_taps = jtag_NumEnabledTaps();
+ size_t num_taps = jtag_tap_count_enabled();
jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
scan_command_t * scan = cmd_queue_alloc(sizeof(scan_command_t));
@@ -138,7 +138,7 @@
field++;
}
- assert(field == out_fields + num_taps); /* paranoia: jtag_NumEnabledTaps() and jtag_NextEnabledTap() not in sync */
+ assert(field == out_fields + num_taps); /* paranoia: jtag_tap_count_enabled() and jtag_NextEnabledTap() not in sync */
return ERROR_OK;
}
|