Skip to content
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

Hardfault handler broken #295

Closed
thejpster opened this issue May 19, 2024 · 4 comments
Closed

Hardfault handler broken #295

thejpster opened this issue May 19, 2024 · 4 comments
Assignees

Comments

@thejpster
Copy link

You should be aware of rust-embedded/cortex-m#532, as you appear to have a hardfault handler that relies on the exception frame being provided. This is broken in cortex-m-rt 0.7.4.

@chrysn
Copy link
Collaborator

chrysn commented May 19, 2024

I'm not really familiar with that portion of the code, assigning to Kaspar.

As that code section has a note that it was copied from Tock: That relates to several of the register reads, but taking the xpsr from the ExceptionFrame is something that AIU was new in our version of it.

@thejpster
Copy link
Author

The bug is that the exception frame reference is garbage in c-m-rt 0.7.4, so anything you try and read from it will cause a second fault (probably due to alignment). I think you should pin to cortex-m-rt 0.7.3 until a bugfix is released.

@kaspar030
Copy link
Collaborator

Thanks, confirmed. #296 pins cortex-m-rt to 0.7.3.

I hadn't actually seen that hard fault debug output in a while, as the bkpt causes probe-rs to exit before it even gets there...

@kaspar030
Copy link
Collaborator

Closing as we've fixed this by workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants