cli: make horrifying formatting regexps even more horrifying.
Before this commit, lists weren't formatted, which was quite ugly
with list items longer than ~70 characters. After this commit, list
items are reflowed and their indentation is normalized.
by
whitequark
4 years 2 months
applet.interface.jtag_probe: rewrite IR/DR interrogation.
* Rename "segmentation" to "interrogation" to follow IEEE 1149.1
terminology (where it is called "blind interrogation").
* Guard for IDCODEs specifically marked as invalid in 1149.1.
* Rewrite IR interrogation logic to be more clear.
* Implement automatic IR interrogation for multiple TAPs where
captured IR value unambiguously resolves IR length.
(A similar but less reliable function was previously implemented
that did not require unambiguous IR lengths. It was removed in
commit bedeca8c.)
* Add unit tests for DR and IR interrogation logic.
by
whitequark
4 years 2 months
support.bits: implement bits.find(), like str.find().
by
whitequark
4 years 2 months
applet.interface.jtag_probe: simplify. NFCI.
There are no more in-tree users of run(reset=), and in general it is
preferred to use Test-Logic/Reset in derived applets explicitly and
then immediately read IDCODE.
by
whitequark
4 years 2 months
applet.debug.arc: modernize JTAG code.
* There is no run_tap(reset=) argument.
* Use Test-Logic/Reset to read IDCODE to avoid crashes on IR length
mismatch.
by
whitequark
4 years 2 months
applet.interface.jtag_probe: formatting. NFC.
by
whitequark
4 years 2 months
applet.interface.sbw_probe: formatting. NFC.
by
whitequark
4 years 2 months
applet.interface.jtag_pinout: suggest voltage argument for probe.
I've originally omitted this because it would not be (easily)
possible once multi-applet support lands, but:
a) this is probably the #1 largest source of frustration in
the jtag-pinout applet, especially since it's used much more
often to avoid wiring mistakes than to discover truly unknown
JTAG pinouts;
b) if the future multi-applet functionality can't support this,
maybe we should rethink it rather than remove anti-frustration
features to make code a bit simpler.
by
whitequark
4 years 2 months
applet.interface.jtag_pinout: always try to detect TRST#.
On a certain device, jtag-pinout would detect a TAP without TRST#,
but using it afterwards with jtag-openocd resulted in spurious debug
session breakage. This was caused by spurious pulses on TRST#, which
were in turn caused by a very weak TAP-side pull-up, TRST# being
connected to but not driven by the applet, and TCK/TMS/TDIO wires
being in close proximity to TRST#.
To avoid this situation happening again, always detect TRST# if there
is any chance it is connected at all.
by
whitequark
4 years 2 months
applet.interface.jtag_pinout: fix misuse of sets.
Since Python 3.7, dict iteration order is the insertion order.
However, set iteration order is always arbitrary.
by
whitequark
4 years 2 months