Skip to content

Commit e1c1e8a

Browse files
committed
Modified underflow error text to print overflow instead. End users are more familiar with handling overflow errors, even if underflow may be technically correct
1 parent c80e5e8 commit e1c1e8a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rtos/TARGET_CORTEX/mbed_rtx_handlers.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ __NO_RETURN uint32_t osRtxErrorNotify (uint32_t code, void *object_id)
4545
switch (code) {
4646
case osRtxErrorStackUnderflow:
4747
// Stack underflow detected for thread (thread_id=object_id)
48-
error("CMSIS-RTOS error: Stack underflow (status: 0x%X, task ID: 0x%X, task name: %s)\n\r",
48+
// Note: "overflow" is printed instead of "underflow" due to end user familiarity with overflow errors
49+
error("CMSIS-RTOS error: Stack overflow (status: 0x%X, task ID: 0x%X, task name: %s)\n\r",
4950
code, object_id, osThreadGetName(object_id));
5051
break;
5152
case osRtxErrorISRQueueOverflow:

0 commit comments

Comments
 (0)