aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/include/mac.h2
-rw-r--r--os/kernel/include/chdebug.h5
-rw-r--r--os/kernel/src/chdebug.c4
3 files changed, 5 insertions, 6 deletions
diff --git a/os/hal/include/mac.h b/os/hal/include/mac.h
index 439510462..6f70aff44 100644
--- a/os/hal/include/mac.h
+++ b/os/hal/include/mac.h
@@ -72,7 +72,7 @@
typedef enum {
MAC_UNINIT = 0, /**< Not initialized. */
MAC_STOP = 1, /**< Stopped. */
- MAC_ACTIVE = 2, /**< Active. */
+ MAC_ACTIVE = 2 /**< Active. */
} macstate_t;
/**
diff --git a/os/kernel/include/chdebug.h b/os/kernel/include/chdebug.h
index 24dce243e..d4e257238 100644
--- a/os/kernel/include/chdebug.h
+++ b/os/kernel/include/chdebug.h
@@ -202,8 +202,6 @@ extern ch_trace_buffer_t dbg_trace_buffer;
#define chDbgAssert(c, m, r) {(void)(c);}
#endif /* !CH_DBG_ENABLE_ASSERTS */
-extern char *dbg_panic_msg;
-
/*===========================================================================*/
/* Panic related macros. */
/*===========================================================================*/
@@ -237,7 +235,8 @@ extern "C" {
void dbg_trace(Thread *otp);
#endif
#if CH_DBG_ENABLED
- void chDbgPanic(char *msg);
+ extern const char *dbg_panic_msg;
+ void chDbgPanic(const char *msg);
#endif
#ifdef __cplusplus
}
diff --git a/os/kernel/src/chdebug.c b/os/kernel/src/chdebug.c
index 0bee1b4ea..55631481f 100644
--- a/os/kernel/src/chdebug.c
+++ b/os/kernel/src/chdebug.c
@@ -254,14 +254,14 @@ void dbg_trace(Thread *otp) {
* @details This pointer is meant to be accessed through the debugger, it is
* written once and then the system is halted.
*/
-char *dbg_panic_msg;
+const char *dbg_panic_msg;
/**
* @brief Prints a panic message on the console and then halts the system.
*
* @param[in] msg the pointer to the panic message string
*/
-void chDbgPanic(char *msg) {
+void chDbgPanic(const char *msg) {
dbg_panic_msg = msg;
chSysHalt();