-
Notifications
You must be signed in to change notification settings - Fork 497
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
RTT host-to-target communication #1253
Conversation
Initial implementation of RTT host-to-target communication with minimal terminal features in the "rtt" subcommand.
This pull request introduces 1 alert and fixes 1 when merging 8a67290 into c90d7bc - view on LGTM.com new alerts:
fixed alerts:
|
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.
Since this change is pretty significant, would you mind adding your copyright to the rtt_cmd.py
header comment?
Aside from that, just please fix the unused local variable warning from LGTM.
If you feel like it, type annotations would be nice but aren't strictly required yet.
This pull request fixes 1 alert when merging db1553f into bc54e81 - view on LGTM.com fixed alerts:
|
This is an initial implementation of RTT host-to-target communication for pyOCD's
rtt
subcommand.stdin
short commands for the targetstdin
is read one character at a time, in a non-blocking fashion. Characters are echoed to the terminal and accumulated in a buffer until we see a CR of LF. At that point, if there is sufficient space in the RTT down-buffer (host-to-target), the buffer is copied character-by-character to the RTT ring buffer.stdin
, allowing the user to make corrections before hitting CR/LF. ESC terminates the session.rtt_cmd.py
, including the addition of a class (copied from here) for cross-platform, non-blocking read of 1 character from stdin.