From 05dd4463dbeef996e6622463866d28059c38701b Mon Sep 17 00:00:00 2001 From: Cruz Monrreal II Date: Mon, 5 Mar 2018 13:38:55 -0600 Subject: [PATCH] Modified underflow error text to print overflow instead. End users are more familiar with handling overflow errors, even if underflow may be technically correct --- rtos/TARGET_CORTEX/mbed_rtx_handlers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtos/TARGET_CORTEX/mbed_rtx_handlers.c b/rtos/TARGET_CORTEX/mbed_rtx_handlers.c index 882d4636af..ebbd3979e3 100644 --- a/rtos/TARGET_CORTEX/mbed_rtx_handlers.c +++ b/rtos/TARGET_CORTEX/mbed_rtx_handlers.c @@ -45,7 +45,8 @@ __NO_RETURN uint32_t osRtxErrorNotify (uint32_t code, void *object_id) switch (code) { case osRtxErrorStackUnderflow: // Stack underflow detected for thread (thread_id=object_id) - error("CMSIS-RTOS error: Stack underflow (status: 0x%X, task ID: 0x%X, task name: %s)\n\r", + // Note: "overflow" is printed instead of "underflow" due to end user familiarity with overflow errors + error("CMSIS-RTOS error: Stack overflow (status: 0x%X, task ID: 0x%X, task name: %s)\n\r", code, object_id, osThreadGetName(object_id)); break; case osRtxErrorISRQueueOverflow: