-
-
Notifications
You must be signed in to change notification settings - Fork 780
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: Add gdb monitor rtt down command #1704
base: main
Are you sure you want to change the base?
Conversation
Hi @koendv 🙂 Since you're the original author of the RTT functionality, could you take a quick look? The main idea is to start the program with Ideally it would be best if I there is a way to interact with the BMP probe from gdb without interrupting the debug session, but I'm not sure how and if it is even possible. Sure I can directly use |
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.
There are a couple of linguistic items we caught in review and some type issues. Please see below for more on those. Please also take care of the clang-format lints the CI picked up.
We're distinctly unsure whether to take this proposed change or not, being how easy it is to use a second console with a serial program to interact with the RTT stream. That said, we can also sort of see the sense of this command too. We'll see how bad the Flash usage hit is after the adjustments requested and have a chat with Esden.
fa7d7d8
to
75c410a
Compare
On Mon, 18 Dec 2023 09:06:36 -0800 Hristo Mitrev ***@***.***> wrote:
Hi @koendv 🙂
Since you're the original author of the RTT functionality, could you
take a quick look?
Hi Hristo.
This also works:
^C
Program received signal SIGINT, Interrupt.
0x08000528 in ?? ()
(gdb) python rtt = open("/dev/ttyBmpTarg", "w")
(gdb) python rtt.write("hello, world")
(gdb) python rtt.flush()
(gdb) c
Continuing.
I'm wondering:
If you send data, maybe you'll want to wait for some kind of reply.
Like the linux "expect" command, or python pexpect.
koen
|
Just for convenience I wanted to be able to push strings to the rtt down buffer without the need to change the active window from the one where the gdb session is running Signed-off-by: Hristo Mitrev <[email protected]>
19758a5
to
6ddf6f2
Compare
6ddf6f2
to
0022d0b
Compare
Hi @koendv, This is a great suggestion, but I am afraid that my use-case is a bit different. PS: it took me a while to realize that there are 2 separate rtt_if.c files for stm32 and launchpad-icdi. I think I fixed the problem and it seems that all the tests now pass. I also rebased to the latest commit in main |
I think an rtt "send" command might be useful as a first step towards making testbenches in gdb/python. |
Hi Again! Since I proposed this enhancement I also realized that it will be helpful when I implement a make-shift password that will be used to lock some debug features of the target. If I implement such password it will be tedious to enter it every time I flash my target. Having this feature will help to automate this. (I thought of this password because I give debug versions of my firmware to testing colleagues who provide me with logs, but the problem is that I also implement "scanf actions" that can alter the internal state of the program and lead to false positive bug reports) One more proposal from my side will be to add Cheers! |
Detailed description
Just for convenience I wanted to be able to
push strings to the rtt down buffer without
the need to change the active window from
the one where the gdb session is running
Your checklist for this pull request
make PROBE_HOST=native
)make PROBE_HOST=hosted
)Closing issues
None