mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/cortexm_common: print last active thread on stack corruption
This commit is contained in:
parent
e62c25a015
commit
00c1f4ea4d
@ -353,6 +353,7 @@ __attribute__((used)) void hard_fault_handler(uint32_t* sp, uint32_t corrupted,
|
||||
/* Sanity check stack pointer and give additional feedback about hard fault */
|
||||
if (corrupted) {
|
||||
puts("Stack pointer corrupted, reset to top of stack");
|
||||
printf("active thread: %"PRIkernel_pid"\n", thread_getpid());
|
||||
}
|
||||
else {
|
||||
uint32_t r0 = sp[0];
|
||||
|
Loading…
Reference in New Issue
Block a user