projects
/
x300-pci
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ask openocd for tap name
[x300-pci]
/
openocd-jtag-boundary-scan.pl
diff --git
a/openocd-jtag-boundary-scan.pl
b/openocd-jtag-boundary-scan.pl
index
d16f465
..
2a3d9eb
100755
(executable)
--- a/
openocd-jtag-boundary-scan.pl
+++ b/
openocd-jtag-boundary-scan.pl
@@
-12,7
+12,6
@@
my $bsdl_file = $ENV{BSDL} ||
'EP4CE6E22.bsd';
# '_3128at100.bsd';
# '3064at44.bsd'; # XXX
'EP4CE6E22.bsd';
# '_3128at100.bsd';
# '3064at44.bsd'; # XXX
-my $tap = $ENV{TAP} || 'tb276.tap';
my $project_file = 'Altera/epm3064_dac/3064at44.qsf';
$project_file = 'tb276/f32c.qsf';
my $project_file = 'Altera/epm3064_dac/3064at44.qsf';
$project_file = 'tb276/f32c.qsf';
@@
-221,16
+220,12
@@
sub bin2hex {
return unpack("H$hlen", pack("B$blen", $b));
}
return unpack("H$hlen", pack("B$blen", $b));
}
-#my $cmd;
-
+my $tap;
+print $sock "jtag names\n"; # will fill-in $tap variable from openocd
my $BSR;
my $BSR;
-# first sample
-print $sock "irscan $tap $opcode->{SAMPLE}\n"; # SAMPLE/PRELOAD
-print $sock "drscan $tap $BOUNDARY_LENGTH 0\n";
-
while(1) {
while (<$sock>) {
while(1) {
while (<$sock>) {
@@
-245,6
+240,14
@@
while (<$sock>) {
print_io $bin if $bin ne $last_bits;
gpio::pins() if $have_gpio;
last;
print_io $bin if $bin ne $last_bits;
gpio::pins() if $have_gpio;
last;
+ } elsif ( m/^(\w+\.tap)$/ && !$tap ) {
+ $tap = $1;
+ warn "# using TAP $tap";
+
+ # first sample
+ print $sock "irscan $tap $opcode->{SAMPLE}\n"; # SAMPLE/PRELOAD
+ print $sock "drscan $tap $BOUNDARY_LENGTH 0\n";
+
} else {
warn "# in ",dump($_);
}
} else {
warn "# in ",dump($_);
}