diff options
author | kc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-01-23 07:05:04 +0000 |
---|---|---|
committer | kc8apf <kc8apf@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-01-23 07:05:04 +0000 |
commit | 4dcad0894077c903a8b94d3b2cb0feb8c9c8b224 (patch) | |
tree | 607b03fbe29c38cf463b7467e4f0d0e6b94fcadf /tools/xsvf_tools/xsvfdump.py | |
parent | 44a7b25487d2fecc978bafbdd7e7e06d0f1304b2 (diff) |
Add TRST support to xsvf tools. Courtesy of Dick Hollenbeck <dick@softplc.com>
git-svn-id: svn://svn.berlios.de/openocd/trunk@1357 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'tools/xsvf_tools/xsvfdump.py')
-rw-r--r-- | tools/xsvf_tools/xsvfdump.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/xsvf_tools/xsvfdump.py b/tools/xsvf_tools/xsvfdump.py index b2e3c7d7..e65f8d5b 100644 --- a/tools/xsvf_tools/xsvfdump.py +++ b/tools/xsvf_tools/xsvfdump.py @@ -39,7 +39,8 @@ Xsdrsize = 0 (XCOMPLETE,XTDOMASK,XSIR,XSDR,XRUNTEST,hole0,hole1,XREPEAT,XSDRSIZE,XSDRTDO, XSETSDRMASKS,XSDRINC,XSDRB,XSDRC,XSDRE,XSDRTDOB,XSDRTDOC, - XSDRTDOE,XSTATE,XENDIR,XENDDR,XSIR2,XCOMMENT,XWAIT,XWAITSTATE,LCOUNT,LDELAY,LSDR) = range(28) + XSDRTDOE,XSTATE,XENDIR,XENDDR,XSIR2,XCOMMENT,XWAIT,XWAITSTATE, + LCOUNT,LDELAY,LSDR,XTRST) = range(29) (RESET,IDLE, @@ -51,6 +52,10 @@ State = ("RESET","IDLE", "DRSELECT","DRCAPTURE","DRSHIFT","DREXIT1","DRPAUSE","DREXIT2","DRUPDATE", "IRSELECT","IRCAPTURE","IRSHIFT","IREXIT1","IRPAUSE","IREXIT2","IRUPDATE") + +trst_mode_allowed = ('ON', 'OFF', 'Z', 'ABSENT') + + Setsdrmasks = 0 SetsdrmasksOnesCount = 0 @@ -229,6 +234,14 @@ def ShowOpcode( op, f ): tdo = bytes2hexString( f, Xsdrsize ) print("LSDR 0x%s 0x%s" % (tdi, tdo) ) + elif op == XTRST: + # the argument is a single byte and it is the index into "trst_mode_allowed" + trst_mode = ReadByte(f) + if trst_mode <= 3: + print("TRST %s" % trst_mode_allowed[trst_mode] ) + else: + print("TRST 0x%02X" % trst_mode ); + else: print("UNKNOWN op 0x%02X %d" % (op, op)) exit(1) |