One more thing
Code: Select all
void chSysHalt(const char *reason) {
port_disable();
/* Halt hook code, usually empty.*/
CH_CFG_SYSTEM_HALT_HOOK(reason);
/* Logging the event.*/
_trace_halt(reason);
/* Pointing to the passed message.*/
ch.dbg.panic_msg = reason;
/* Harmless infinite loop.*/
while (true) {
}
}
Can you move the system halt hook just before the infinite loop? In this way, I can stop the execution in the hook, and the event will still be logged.
I don't know if this would be interesting for everyone, but it's worth a try
Thanks again