-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
west: Add west rtt
command
#75508
west: Add west rtt
command
#75508
Conversation
This would be really awesome to have. For our internal processes I created a wrapper around JLinkExeRTTViewer so we could have a single command that does that. How would enabling a running server be implemented in the case of JLink? As a separate command or an additional flag to the |
I think the two possible approaches, of which we should maybe do both as separate commands, are:
The first approach is easy, when all you want is to see the log, but the second is more flexible and compatible with the other debug/debugserver/attach commands. |
I think that second approach makes sense, like you said, it is compatible with other commands. Two things:
|
No, i just always use it, because the default runner is usually not what i want
I consideren this option, but i think its nicer to have it either as a separate command, or as an argument. Connecting to arbitrary ports when not asked to is probably a no go. Besides, consistent behavior seems preferable |
Looks very neat BTW |
LMK if i should have pushed this latest commit to a different PR, now that this had been partially approved. I just thought id better get this jlink support in along with the rest. jlink support is implemented in much the same way as openocd, except it can better automatically locate the rtt block, so it relies on that. |
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.
Cool, second commit message is stale I guess, feel free to update it.
Any objections to me just squashing all three commits? |
Yes, don't. :-) Just reword the second commit message, the rest is fine as it is. |
This command runs separately from a debug server, instead of attaching to a running server. This is both the easiest out of the box experience, and also should be possible to implement consistently for most runners. This commit includes an initial implementation for pyocd. Signed-off-by: Tobias Pisani <[email protected]>
This was non-trivial, as openocd is a bit weird to work with. Using only commands passed with '-c' arguments, I couldn't get it to reliably resume (or just not halt) the target when started. I tried using the 'sleep' command, and various 'configure -event XX { resume }' events, but nothing panned out, as it seems to always halt after all `-c` commands have been run. To avoid that, this waits for the TCL RPC port to be up, and sends a resume command there. This works reliably. Signed-off-by: Tobias Pisani <[email protected]>
Moves the telnet client into runners/core.py as well, as this is now shared between openocd and jlink. Signed-off-by: Tobias Pisani <[email protected]>
alright, reworded and reordered, apparently i had swapped the first two commits somewhere along the way |
A follow-up PR to add this to the documentation would be nice. |
Implemented in the pyocd and openocd runners while awaiting some feedback.
This command runs separately from a debug session. We should probably also support attaching a rtt client to a running debugserver. However, this might work differently for each runner. pyocd is easy, as it supports a separate RTT command, while openocd and jlink will always need a running server.
See the FIXME's for other points i would like input on.