-
-
Notifications
You must be signed in to change notification settings - Fork 77
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 implementation should probably not default to blocking mode #133
Comments
I would like to make
I think we can avoid that one. The initial value of RTT_BLOCK is stored in Flash so (*) the operation is a bit gnarly but since RTT_BLOCK has a known memory location and memory layout it should be possible |
Flashing the value permanently assumes that people reflash after using probe-run though. I think it's likely that many people will forget/not know that they should. |
I learned about it today the hard way. How can I turn logging completely off for release build, but allow it for dev build? |
I think to fix this we can:
|
Sounds like a good solution to me. |
Judging by the code it looks like RTT output will block forever once the buffer is full if there's no debugger attached to empty it. This will cause applications to stop working after a while when nothing is there to empty the buffer which leads to the same problem as semihosting's "why doesn't my application work when not being debugged", except after a sneaky delay.
rtt-target
supports changing the buffer mode on the fly via the debugger, so one option would be to implement that, default to a non-blocking mode, and when a debugger (such as the de facto probe-run) attaches, the debugger could change the mode on the fly to a blocking mode to ensure messages aren't lost. That leaves a race condition between application boot and debugger attach where messages can be lost, however using a breakpoint to synchronize with the debugger can be used to solve that.The text was updated successfully, but these errors were encountered: