-
-
Notifications
You must be signed in to change notification settings - Fork 75
blocking rtt hangs process #16
Comments
That should already be the case.
this behavior (truncation) can be changed in
deadlock isn't expected or desired behavior. If you could share an example that reproduces this we can take a closer look. Or maybe I'm not correctly understanding what you are trying to do ("print large buffers on exit"). Could you share a snippet that shows what you are doing? Also, using By the way, what probe are you using? J-Link? We have seen relatively bad performance from J-Link, compared to CMSIS-DAP, at least when using |
stm32f407g-disc1 with whatever stlink is on there. On an example with a small write, it exits and prints as expected, but here it sits at
I can put a smaller write in above this and that'll come out fine before hanging
|
uhh, that looks very strange indeed. I wonder if it may be Undefined Behavior in rtt-target (probe-rs/rtt-target#4 -- they are using volatile ops instead of proper atomic ops) and the write pointer is not being properly advanced or something? Do you think you could do me the great favor of retesting I'll also try a program like yours on some hardware I have but may not be able to do that this week. |
Surely
|
Which is to say it doesn't block or hang but loses everything in the channel |
I can repro. This eats everything: defmt::info!("A");
let x: [f32; 256] = /* .. */;
defmt::info!("{:?}", x);
defmt::info!("B");
exit() This work but only if there's a large delay: defmt::info!("A");
let x: [f32; 128] = /* .. */;
let y: [f32; 128] = /* .. */;
defmt::info!("{:?}", x);
asm::delay(10_000_000);
defmt::info!("{:?}", y);
defmt::info!("B");
exit() |
|
Confirmed defmt fix but rttprint still hangs. So now we think the last bug is in there somewhere? |
Confirmed rtt-target blocking mode blocks forever in cargo embed as well |
Solved via rtt-target as well. Thanks for the repo and for the fix. |
Any thoughts against servicing the rtt buffer the entire time? Im trying to print large buffers on exit, but theyre either truncated because the buffer is full (and youd hate to set the rtt buffer to 10k or something) or in rtt blocking deadlock because the buffer inst serviced until the breakpoint is reached.
Any architectural reasons or?
The text was updated successfully, but these errors were encountered: