From 1bdcf39d7b55642ae26bc32ffed1fdc36cfc9d56 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 13 Feb 2014 09:49:17 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6710 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/include/chschd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'os/rt/include') diff --git a/os/rt/include/chschd.h b/os/rt/include/chschd.h index fe85f76cb..a89c49161 100644 --- a/os/rt/include/chschd.h +++ b/os/rt/include/chschd.h @@ -333,8 +333,10 @@ typedef struct ch_system { * @brief Pointer to the panic message. * @details This pointer is meant to be accessed through the debugger, it is * written once and then the system is halted. + * @note Accesses to this pointer must never be optimized out so the + * field itself is declared volatile. */ - const char *dbg_panic_msg; + const char * volatile dbg_panic_msg; #endif #if CH_DBG_SYSTEM_STATE_CHECK || defined(__DOXYGEN__) /** -- cgit v1.2.3