aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/src/chsys.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-17 11:52:50 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-17 11:52:50 +0000
commit155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1 (patch)
treecb27035ab0b6a7c157f992d9edb6a2c7c5d669e9 /os/rt/src/chsys.c
parent120b97e07051b35a67be2a173b51b7edc2a0ae19 (diff)
downloadChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.tar.gz
ChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.tar.bz2
ChibiOS-155ef8ed75b12442fde1d80e4ca880d0e7f7c1f1.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6169 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/src/chsys.c')
-rw-r--r--os/rt/src/chsys.c10
1 files changed, 8 insertions, 2 deletions
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.*/