-
Notifications
You must be signed in to change notification settings - Fork 241
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
Allow printing defmt output to the RTT console #880
base: master
Are you sure you want to change the base?
Conversation
Oh, and defmt-print must be installed for this to work. Maybe add a tooltip for that? |
@haneefdm Do you have questions about this? |
Thank you for the PR and I agree it will be very useful for Rust developers Before I look at it, I have a request. I need an example project available on github for me to begin looking at it. It will be my test case as well. Your github example project should be ready to run with minimal effort on my part (preferably on a Mac). I cannot accept what I cannot test. I am not Rust-educated either. I you can also update the source code to add a reference to the example github then that would be nice. Sorry, it took me a long time to get to it. Personal health reasons. |
super(tcpPort, channel); | ||
|
||
this.cwd = wsPath; | ||
this.executable = Path.relative(wsPath, executable); |
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.
Why?
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.
@haneefdm I checked the source of defmt and probe-rs. This is because by default, defmt's message is compressed. The detailed info is stored in .elf file, that's why the executable is needed: without .elf, the message cannot be parsed.
See https://github.com/knurling-rs/defmt/blob/main/decoder/src/lib.rs#L157 . The Table
is what's stored in .elf file
I lied. I did a cursory review. I don't know what is going on with the And, then in the constructor of the Also, I think that the |
I'll get back to this in a few days. I need to refresh my memory after taking care of some other stuff. |
Any updates? I got the same problem, cortex-debug cannot print defmt's RTT log |
Installed extension from this PR, everything works perfectly, except vscode does not hint to set |
@xoviat I am still waiting for the PRs original author. |
Any news here? Can I help with any blocker? |
defmt is widely used as a logger in the rust embedded ecosystem. This allows seamlessly debugging a rust program while printing defmt output at the same time.