summaryrefslogtreecommitdiff
path: root/src/jtag/jtag.c
diff options
context:
space:
mode:
authordrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-08-11 17:49:41 +0000
committerdrath <drath@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2006-08-11 17:49:41 +0000
commitec0f06db114d1cc9d1d59acd8f4e3b32414d5b8e (patch)
tree23644c757a85534a5daa6ce21b44c766321fba5d /src/jtag/jtag.c
parentca1e5ee1f4236e2e384397bf6211ce56a1f687f5 (diff)
downloadopenocd+libswd-ec0f06db114d1cc9d1d59acd8f4e3b32414d5b8e.tar.gz
openocd+libswd-ec0f06db114d1cc9d1d59acd8f4e3b32414d5b8e.tar.bz2
openocd+libswd-ec0f06db114d1cc9d1d59acd8f4e3b32414d5b8e.tar.xz
openocd+libswd-ec0f06db114d1cc9d1d59acd8f4e3b32414d5b8e.zip
- added support for FreeBSD ppi (parallel port access similar to /dev/parport on linux) (thanks to Darius for this patch)
- unified 'ftd2xx' and 'ftdi2232' into a single interface 'ft2232'. The library used to access the hardware is choosen during configure with --enable-ft2232_ftd2xx or --enable-ft2232-libftdi. git-svn-id: svn://svn.berlios.de/openocd/trunk@83 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/jtag/jtag.c')
-rw-r--r--src/jtag/jtag.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 0ffeb56e..a60aacd0 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -124,12 +124,12 @@ jtag_event_callback_t *jtag_event_callbacks;
extern jtag_interface_t parport_interface;
#endif
-#if BUILD_FTDI2232 == 1
- extern jtag_interface_t ftdi2232_interface;
+#if BUILD_FT2232_FTD2XX == 1
+ extern jtag_interface_t ft2232_interface;
#endif
-#if BUILD_FTD2XX == 1
- extern jtag_interface_t ftd2xx_interface;
+#if BUILD_FT2232_LIBFTDI == 1
+ extern jtag_interface_t ft2232_interface;
#endif
#if BUILD_AMTJTAGACCEL == 1
@@ -144,11 +144,11 @@ jtag_interface_t *jtag_interfaces[] = {
#if BUILD_PARPORT == 1
&parport_interface,
#endif
-#if BUILD_FTDI2232 == 1
- &ftdi2232_interface,
+#if BUILD_FT2232_FTD2XX == 1
+ &ft2232_interface,
#endif
-#if BUILD_FTD2XX == 1
- &ftd2xx_interface,
+#if BUILD_FT2232_LIBFTDI == 1
+ &ft2232_interface,
#endif
#if BUILD_AMTJTAGACCEL == 1
&amt_jtagaccel_interface,
@@ -1119,7 +1119,9 @@ int jtag_validate_chain()
{
if (buf_get_u32(ir_test, chain_pos, 2) != 0x1)
{
- ERROR("Error validating JTAG scan chain, IR mismatch");
+ char *cbuf = buf_to_char(ir_test, total_ir_length);
+ ERROR("Error validating JTAG scan chain, IR mismatch, scan returned %s", cbuf);
+ free(cbuf);
exit(-1);
}
chain_pos += device->ir_length;
@@ -1128,7 +1130,9 @@ int jtag_validate_chain()
if (buf_get_u32(ir_test, chain_pos, 2) != 0x3)
{
- ERROR("Error validating JTAG scan chain, IR mismatch");
+ char *cbuf = buf_to_char(ir_test, total_ir_length);
+ ERROR("Error validating JTAG scan chain, IR mismatch, scan returned %s", cbuf);
+ free(cbuf);
exit(-1);
}
@@ -1217,6 +1221,12 @@ int jtag_init(struct command_context_s *cmd_ctx)
* didn't match one of the compiled-in interfaces
*/
ERROR("No valid jtag interface found (%s)", jtag_interface);
+ ERROR("compiled-in jtag interfaces:");
+ for (i = 0; jtag_interfaces[i]; i++)
+ {
+ ERROR("%i: %s", i, jtag_interfaces[i]->name);
+ }
+
jtag = NULL;
return ERROR_JTAG_INVALID_INTERFACE;
}