when running ChibiOS in debug mode, I would like to get a human readable message if a sanity check (i.e. chDbgCheck or chDbgAssert) fails. So far I used the CH_CFG_SYSTEM_HALT_HOOK, which is called at the very end of the chSysHalt() function and accessed the UART LLD directly from within the hook. This solution, however, is not feasible anymore as I ported my system to another MCU, which implements a different UART LLD (my solution obviously is platform dependent
A straight forward solution would be to introduce another hook "CH_CFG_SYS_HALT_INTRO(reason)", which is called at the beginning of chSysHalt(). I dislike the idea of introducing so many hooks, though, so maybe you have a better idea?
Background info - my use case:
I've developed some software, which is used by several people now and hence new issues arise. Those people, however, just want to use my system but develop their own stuff. They usually don't have the resources for in-depth debugging so I need a way for them to easily tell me what kind of error occurred. As a result, I simply print out unique error messages. I know that delaying a kernel panic is not essentially a good thing to do, but in my development case that would be ok.
Thanks for your advice!
- Thomas