From 10178bb3c56270699ae6caa6ea672244349a46a2 Mon Sep 17 00:00:00 2001 From: Kolja Waschk Date: Wed, 17 Dec 2008 19:55:23 +0000 Subject: [PATCH] Added code (#ifdef 0) for discovery debugging git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1407 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 4 ++++ jtag/src/tap/discovery.c | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index eb4684cc..c0d04547 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,7 @@ +2008-12-17 Kolja Waschk + + * src/tap/discovery.c: Optional (#ifdef) printf for discovery debugging + 2008-12-16 Kolja Waschk * data/Makefile.am: Added bcm6358 files, thanks Anselmo Luginbuehl diff --git a/jtag/src/tap/discovery.c b/jtag/src/tap/discovery.c index 6a5f7a5c..4fb45686 100644 --- a/jtag/src/tap/discovery.c +++ b/jtag/src/tap/discovery.c @@ -38,6 +38,8 @@ #define TEST_COUNT 1 #define TEST_THRESHOLD 100 /* in % */ +#undef VERY_LOW_LEVEL_DEBUG + int detect_register_size( chain_t *chain ) { @@ -70,14 +72,20 @@ detect_register_size( chain_t *chain ) tap_shift_register( chain, rz, NULL, 0 ); tap_shift_register( chain, rpat, rout, 0 ); +#ifdef VERY_LOW_LEVEL_DEBUG + printf(">>> %s\n", register_get_string(rz)); + printf(" + %s\n", register_get_string(rpat)); +#endif tdo = register_all_bits_same_value(rout); if(tdo_stuck == -2) tdo_stuck = tdo; if(tdo_stuck != tdo) tdo_stuck = -1; register_shift_right( rout, len ); - if (register_compare( rpat, rout ) == 0) ok++; +#ifdef VERY_LOW_LEVEL_DEBUG + printf(" = %s => %d\n", register_get_string(rout), ok); +#endif } if (100 * ok / TEST_COUNT < TEST_THRESHOLD) { ok = 0;