Fix rtt_target blocking panic handler.#491
Conversation
|
Why would this only be triggered in release? IIRC the unsafe conjure is there to avoid deadlock/borrow failure. with_terminal_channel looks like it would panic when nested. |
|
And a hang on panic doesn't sound too bad here. IIRC the watchdog should kick in. |
Right, it isn't. It's triggered when no debug probe is connected. However there is already an assumption in the
The watchdog does indeed kick in, but I'd like the device to immediately reset without delay rather than wait for 4 seconds for the watchdog. Maybe adding an |
|
Ack the
The reboot on panic never actually solves any problem or bug. I'm fine with keeping it as is. It seems slightly better than the alternative. But I won't spend time on "optimizing the panic experience". Rather fix the cause of the panic. |
e9ec34b to
8c6c052
Compare
|
|
||
| #[cfg(debug_assertions)] | ||
| loop {} | ||
| cortex_m::asm::bkpt(); |
There was a problem hiding this comment.
Is this, combined with watchdog.stop_on_debug(...), enough, or do you additionally want to completely disable the watchdog when the rtt feature is enabled?
There was a problem hiding this comment.
Ah. Just watchdog.stop_on_debug is fine. Good find.
|
@jordens, anything still missing here? |
|
The review request was. |
jordens
left a comment
There was a problem hiding this comment.
Linker script needs fixing AFAICT
|
Seems like |
|
63b24b7 to
d9501af
Compare
|
@jordens, I finally got around to testing this again. I ran the HITL tests locally but couldn't reproduce the error you posted. I did have to comment out the I saw the |
d9501af to
b3d3f90
Compare
|
Could you dummy-update the branch? CI got disabled and doesn't pick this up until it's updated. |
b3d3f90 to
e4d533f
Compare
|
With newer miniconf in this context it should target the specific booster by id, not discover by wildcard. I think we do it similarly over in stabilizer hitl. |
|
Ah, so the CI environment has two boosters and fails because it only expects one? Which of them should be used then, |
jordens
left a comment
There was a problem hiding this comment.
Let's try. But I'm pretty sure it's the live one. 80-34-28-1b-45-41
|
7ccd1d1 to
5f72c44
Compare
|
It times out in the calibration. Let's just calibrate on two channels. But I've also seen it timeout in a different way. This may be a different problem: |
In release mode, the
panic_persist::report_panic_infowas never reached because the panic handler would block when writing to the RTT target (since none is connected).Only set
BlockIfFullin debug mode, and replace unsafeUpChannel::conjurewithwith_terminal_channelwhile we're at it.