Print test panics using semihosting
#2257
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It seems we still don't get valuable stack traces on Xtensa. Although, even if we had, a panic's cause is unclear. In order to provide as much info as possible, this PR changes HIL tests to output panic messages using semihosting, which is a different mechanism based on breakpoints and debugger support.
This PR is pending on probe-rs/probe-rs#2740 and probe-rs/probe-rs#2841 (which are now deployed on the runners).
There is one downside: probe-rs doesn't capture test output yet, so the test logs contain the panic messages from
#[should_panic]
tests.This PR disables
esp-hal/defmt
for tests so that if a panic happens inside the HAL, its message gets printed.