itm icon indicating copy to clipboard operation
itm copied to clipboard

parsing the itm.txt data

Open NitinSaxenait opened this issue 4 years ago • 1 comments

Hi, I am working with The Discovery Book and almost completed it. The task I am working on is to get the sensors readings from the itm.txt file and POST those readings on a server. Now I am successfully able to get the readings from the sensor in the itm.txt but as told in the book the data is combined with the frames(Headers, payload). Now the problem is when I am taking this data from the itm.txt all unwanted data is coming with it. And I am getting readings like this.

"\u0003x = \u0001-\u000230\u00013\u0003 y =\u0001 \u000218\u00012\u0001 \u0002z \u0002= \u0001-\u000231\u00010\u0002 t\u0003heta\u0001 \u00012\u0001.\u00016\u000200\u000268\u00018\u0001",

Whereas I want data to be in this form

x = -303 y = 182 z = -310 theta 2.600688
x = -297 y = 181 z = -312 theta 2.59427

How I can do that using the itm crate. I am stuck here and finding no way, already discuss this with some experts on Stackoverflow

I am expecting an answer to solve this. Thanks

NitinSaxenait avatar Aug 26 '21 11:08 NitinSaxenait

After a quick look at the source code of the crate and itmdump, I do not think extension packet arbitration is handled correctly which may be the cause of the issue. From the ARMv7-M reference manual:

Whenever a debugger receives an Instrumentation packet, it uses the page number from the last Extension packet it received, or a page number of 0 if it has not received an Extension packet since it last received a Synchronization.

tmplt avatar Nov 20 '21 01:11 tmplt