X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=tools%2Fxsvf_tools%2Fxsvfdump.py;h=e65f8d5b273263fdc26daacaa4009aa157e18f91;hb=164450a01576cfe3b003fdf1b6c80e6f228bfb5d;hp=b2e3c7d7e29322f266358fb9589d619b15f185a5;hpb=1f9b15867aa9fde65a0c083c8c0744bea66f5c90;p=openocd 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)