From 155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 17 Aug 2013 11:52:50 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6169 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/src/chsys.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'os/rt/src/chsys.c') diff --git a/os/rt/src/chsys.c b/os/rt/src/chsys.c index 9212cbf5f..89c2db5f7 100644 --- a/os/rt/src/chsys.c +++ b/os/rt/src/chsys.c @@ -166,12 +166,18 @@ void chSysInit(void) { * * @special */ -void chSysHalt(void) { +void chSysHalt(const char *reason) { port_disable(); +#if CH_DBG_ENABLED + ch.dbg_panic_msg = reason; +#else + (void)reason; +#endif + #if defined(CH_CFG_SYSTEM_HALT_HOOK) || defined(__DOXYGEN__) - CH_CFG_SYSTEM_HALT_HOOK(); + CH_CFG_SYSTEM_HALT_HOOK(reason); #endif /* Harmless infinite loop.*/ -- cgit v1.2.3