X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Farm_itm%2Fpd.py;h=8ceeac464ae6545872a30ef3f166755c430b85f6;hb=3378f524a1b720cdcedb10089ad4f9bacc33cb4f;hp=33649a07ec106a305aa531b2f3655ba3d54498cf;hpb=4539e9ca58966ce3c9cad4801b16c315e86ace01;p=libsigrokdecode.git diff --git a/decoders/arm_itm/pd.py b/decoders/arm_itm/pd.py index 33649a0..8ceeac4 100644 --- a/decoders/arm_itm/pd.py +++ b/decoders/arm_itm/pd.py @@ -37,14 +37,15 @@ ARM_EXCEPTIONS = { } class Decoder(srd.Decoder): - api_version = 2 + api_version = 3 id = 'arm_itm' name = 'ARM ITM' longname = 'ARM Instrumentation Trace Macroblock' - desc = 'Trace data from Cortex-M / ARMv7m ITM module.' + desc = 'ARM Cortex-M / ARMv7m ITM trace protocol.' license = 'gplv2+' inputs = ['uart'] - outputs = ['arm_itm'] + outputs = [] + tags = ['Debug/trace'] options = ( {'id': 'objdump', 'desc': 'objdump path', 'default': 'arm-none-eabi-objdump'}, @@ -54,7 +55,7 @@ class Decoder(srd.Decoder): 'default': ''}, ) annotations = ( - ('trace', 'Trace information'), + ('trace', 'Trace info'), ('timestamp', 'Timestamp'), ('software', 'Software message'), ('dwt_event', 'DWT event'), @@ -68,18 +69,21 @@ class Decoder(srd.Decoder): ('function', 'Current function'), ) annotation_rows = ( - ('trace', 'Trace information', (0, 1)), - ('software', 'Software trace', (2,)), - ('dwt_event', 'DWT event', (3,)), - ('dwt_watchpoint', 'DWT watchpoint', (4,)), - ('dwt_exc', 'Exception trace', (5,)), - ('dwt_pc', 'Program counter', (6,)), - ('mode', 'Current mode', (7, 8, 9)), - ('location', 'Current location', (10,)), - ('function', 'Current function', (11,)), + ('traces', 'Trace info', (0, 1)), + ('softwares', 'Software traces', (2,)), + ('dwt_events', 'DWT events', (3,)), + ('dwt_watchpoints', 'DWT watchpoints', (4,)), + ('dwt_excs', 'Exception traces', (5,)), + ('dwt_pcs', 'Program counters', (6,)), + ('modes', 'Current modes', (7, 8, 9)), + ('locations', 'Current locations', (10,)), + ('functions', 'Current functions', (11,)), ) def __init__(self): + self.reset() + + def reset(self): self.buf = [] self.syncbuf = [] self.swpackets = {}