Skip to content
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

defmt_rtt::flush implementation does not work with probe-rs #818

Open
Urhengulas opened this issue Mar 7, 2024 · 2 comments
Open

defmt_rtt::flush implementation does not work with probe-rs #818

Urhengulas opened this issue Mar 7, 2024 · 2 comments
Labels
type: bug Something isn't working

Comments

@Urhengulas
Copy link
Member

I just realized that probe-rs does not set RTT to blocking, at least that is how I understand the documentation (link). While this is generally good, this means the defmt-rtt cannot detect that probe-rs is connected and therefore the flush implementation does not work anymore.

fn host_is_connected(&self) -> bool {
// we assume that a host is connected if we are in blocking-mode. this is what probe-run does.
self.flags.load(Ordering::Relaxed) & MODE_MASK == MODE_BLOCK_IF_FULL
}

Any ideas how to detect it otherwise?

@Urhengulas Urhengulas added the type: bug Something isn't working label Mar 7, 2024
@bugadani
Copy link

I think it's a clever enough idea and we can configure channels to blocking in probe-rs if we can prove they are defmt-related up channels.

@Urhengulas
Copy link
Member Author

I think it's a clever enough idea and we can configure channels to blocking in probe-rs if we can prove they are defmt-related up channels.

That's a good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants