The panic handler now has an optional log feature. If enabled, the default panic handler will log the panic message at the error level.
Try the new example to demonstrate the feature with the USB logger:
cargo run --example panic_log --target=thumbv7em-none-eabihf --release --all-features
An ISR-driven USB logger should be able to emits its log message. But, this might not be true if the panic happens within a critical section, or when the USB ISR is masked. There's a general caveat in the crate documentation, stating that users are responsible for making sure they can see the panic message.
The panic handler now has an optional log feature. If enabled, the default panic handler will log the panic message at the error level.
Try the new example to demonstrate the feature with the USB logger:
An ISR-driven USB logger should be able to emits its log message. But, this might not be true if the panic happens within a critical section, or when the USB ISR is masked. There's a general caveat in the crate documentation, stating that users are responsible for making sure they can see the panic message.