X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Farm_itm%2Fpd.py;h=8ceeac464ae6545872a30ef3f166755c430b85f6;hb=de219b2b77dba06815869823789458581500ca03;hp=f6a021226bb93aefc5b8d47c7d58c75e11f23eeb;hpb=27c69645218c7cc88c991c8c18b585ffd092acc0;p=libsigrokdecode.git diff --git a/decoders/arm_itm/pd.py b/decoders/arm_itm/pd.py index f6a0212..8ceeac4 100644 --- a/decoders/arm_itm/pd.py +++ b/decoders/arm_itm/pd.py @@ -14,8 +14,7 @@ ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## along with this program; if not, see . ## import sigrokdecode as srd @@ -38,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'}, @@ -55,7 +55,7 @@ class Decoder(srd.Decoder): 'default': ''}, ) annotations = ( - ('trace', 'Trace information'), + ('trace', 'Trace info'), ('timestamp', 'Timestamp'), ('software', 'Software message'), ('dwt_event', 'DWT event'), @@ -69,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, **kwargs): + def __init__(self): + self.reset() + + def reset(self): self.buf = [] self.syncbuf = [] self.swpackets = {}