Hello.
Sometime something goes wrong, and program stop. Before launching gdb server is it possible to know
what goes wrong via serial console ?, is it possible to do thing like
* register something like a panic handler which is called, with an api to know what has caused the problem
or
* associate a BaseSequentialStream object to a debug function, and leave chibios print a diagnostic before hanging.
Thanks
Alexandre
handler of something like general kernel fault
Moderators: RoccoMarco, lbednarz, tfAteba
Re: handler of something like general kernel fault
Search the code for chDbgPanic() -- and don't forget to enable the corresponding debug flags.
BR,
Gerhard
BR,
Gerhard
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: handler of something like general kernel fault
Correct, the OS always hangs in the panic handler and then the stack trace allows to understand where in halted. The global variable dbg_panic_msg will point to the error message.
If you install the ChibiOS debug plugin the message is automatically fetched and shown to you.
Giovanni
If you install the ChibiOS debug plugin the message is automatically fetched and shown to you.
Giovanni