-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add memory trace parser to mbed client #789
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. @screamerbg What do you think of this sterm plugin?
Looks good indeed! Thanks for this @thinkberg. I'd like to involve few guys from the various teams (including OOB) to try this functionality. @sg-, @MarceloSalazar, @maclobdell, @toyowata, @bentcooke could you guys try this cool addition to the sterm functionality? |
Of course, go check it. The python is not optimal yet, but I wanted to get it done in between all the other projects. There is some room for code improvements and simplification. |
@thinkberg Could you please elaborate about the line mode? |
I have to collect the output lines to do the matching. This leads to a situation where I am collecting serial output from the board until I see a CR or NL. |
Or put in other words, the plugin outputs whole lines, not characters on the terminal. |
for c in rx_input: | ||
if c == '\r' or c == '\n': | ||
if len(self.buffer): | ||
out += self.trace_line(self.buffer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the place where it runs the data through the trace matcher. The transformer class collects data until it sees either \r
or \n
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reference
Opinions? Recommendations? Wishes? |
We should come to an end here ;-) |
Here is the memory trace parser embedded into the sterm functionality. It was pretty easy using the transform functionality of MiniTerm. However, it also means that the sterm basically enters a line mode. So if you expect a prompt on a single line, it may not show up when using trace.
Run the terminal with
--trace <resetstring>
:mbed sterm --trace "ubirch" -r
The
<resetstring>
resets the counters, so you can press the reset button and it will clear the counter. Apart from that I think the screenshot is pretty self explanatory.The output is as follows:
Enjoy,
Leo.