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

cpu/cortexm_common: remove breakpoint from hard_fault_handler #17781

Merged
merged 1 commit into from
Jun 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
cpu/cortexm_common: remove breakpoint from hard_fault_handler
The hard fault handler would normally call core_panic() which in turn
calls ps() - this already helps debugging a lot of crashes caused by
a thread stack overflow.

With the breakpoint in place, the code will not advance to this, leaving
users unknown of this feature in the dark.

On top, the breakpoint is not very helpful if thread stacks are already
corrupted.

Let's just drop it for simplicity's sake - it's not there for any other
architectures.
  • Loading branch information
benpicco committed Mar 9, 2022
commit 1fa1d348d80b537ea5b0ba13b985051b2e1bd2ff
1 change: 0 additions & 1 deletion cpu/cortexm_common/vectors_cortexm.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ __attribute__((used)) void hard_fault_handler(uint32_t* sp, uint32_t corrupted,
: "r0", "r1", "r2", "r3", "r12"
);
}
__BKPT(1);

core_panic(PANIC_HARD_FAULT, "HARD FAULT HANDLER");
}
Expand Down