From 71f174d00dcd678fa9da5acea8e1454f2417810c Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 2 Apr 2016 16:47:14 +0000 Subject: Fixed stack limit conditions in RT4. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9224 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/various/shell/shell_cmd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'os/various/shell/shell_cmd.c') diff --git a/os/various/shell/shell_cmd.c b/os/various/shell/shell_cmd.c index 359207da0..7f31dc87f 100644 --- a/os/various/shell/shell_cmd.c +++ b/os/various/shell/shell_cmd.c @@ -161,8 +161,13 @@ static void cmd_threads(BaseSequentialStream *chp, int argc, char *argv[]) { chprintf(chp, "stklimit stack addr refs prio state name\r\n"); tp = chRegFirstThread(); do { +#if CH_DBG_ENABLE_STACK_CHECK == TRUE + uint32_t stklimit = (uint32_t)tp->stklimit; +#else + uint32_t stklimit = 0U; +#endif chprintf(chp, "%08lx %08lx %08lx %4lu %4lu %9s %12s\r\n", - (uint32_t)tp->stklimit, (uint32_t)tp->ctx.sp, (uint32_t)tp, + stklimit, (uint32_t)tp->ctx.sp, (uint32_t)tp, (uint32_t)tp->refs - 1, (uint32_t)tp->prio, states[tp->state], tp->name == NULL ? "" : tp->name); tp = chRegNextThread(tp); -- cgit v1.2.3