Przeglądaj źródła

RTX5: rename error code for stack overflow

Robert Rostohar 4 lat temu
rodzic
commit
b4b5d3c4e4

+ 5 - 5
ARM.CMSIS.pdsc

@@ -2937,7 +2937,7 @@ and 8-bit Java bytecodes in Jazelle state.
 
         <!-- RTX configuration -->
         <file category="header" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.h"  version="5.5.1"/>
-        <file category="source" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.c"  version="5.1.0"/>
+        <file category="source" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.c"  version="5.1.1"/>
 
         <!-- RTX templates -->
         <file category="source" attr="template" name="CMSIS/RTOS2/RTX/Template/main.c"      version="2.1.0" select="CMSIS-RTOS2 'main' function"/>
@@ -3028,7 +3028,7 @@ and 8-bit Java bytecodes in Jazelle state.
 
         <!-- RTX configuration -->
         <file category="header" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.h"  version="5.5.1"/>
-        <file category="source" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.c"  version="5.1.0"/>
+        <file category="source" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.c"  version="5.1.1"/>
 
         <!-- RTX templates -->
         <file category="source" attr="template" name="CMSIS/RTOS2/RTX/Template/main.c"      version="2.1.0" select="CMSIS-RTOS2 'main' function"/>
@@ -3098,7 +3098,7 @@ and 8-bit Java bytecodes in Jazelle state.
 
         <!-- RTX configuration -->
         <file category="header" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.h"  version="5.5.1"/>
-        <file category="source" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.c"  version="5.1.0"/>
+        <file category="source" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.c"  version="5.1.1"/>
 
         <!-- RTX templates -->
         <file category="source" attr="template" name="CMSIS/RTOS2/RTX/Template/main.c"      version="2.1.0" select="CMSIS-RTOS2 'main' function"/>
@@ -3205,7 +3205,7 @@ and 8-bit Java bytecodes in Jazelle state.
 
         <!-- RTX configuration -->
         <file category="header" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.h"  version="5.5.1"/>
-        <file category="source" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.c"  version="5.1.0"/>
+        <file category="source" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.c"  version="5.1.1"/>
 
         <file category="source" attr="config"   name="CMSIS/RTOS2/RTX/Config/handlers.c"    version="5.1.0"/>
 
@@ -3263,7 +3263,7 @@ and 8-bit Java bytecodes in Jazelle state.
 
         <!-- RTX configuration -->
         <file category="header" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.h"  version="5.5.1"/>
-        <file category="source" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.c"  version="5.1.0"/>
+        <file category="source" attr="config"   name="CMSIS/RTOS2/RTX/Config/RTX_Config.c"  version="5.1.1"/>
 
         <!-- RTX templates -->
         <file category="source" attr="template" name="CMSIS/RTOS2/RTX/Template/main.c"      version="2.1.0" select="CMSIS-RTOS2 'main' function"/>

+ 1 - 1
CMSIS/DoxyGen/RTOS2/src/cmsis_os2.txt

@@ -884,7 +884,7 @@ RTX5 implements a software stack overflow checking that traps stack overruns. St
 automatic variables. Extensive usage or incorrect stack configuration may cause a stack overflow. Software stack overflow
 checking is controlled with the define \c OS_STACK_CHECK.
  
-If a stack overflow is detected, the function \ref osRtxErrorNotify with error code \ref osRtxErrorStackUnderflow is called. By
+If a stack overflow is detected, the function \ref osRtxErrorNotify with error code \ref osRtxErrorStackOverflow is called. By
 default, this function is implemented as an endless loop and will practically stop code execution.
 
 \subsection threadConfig_watermark Stack Usage Watermark

+ 8 - 2
CMSIS/DoxyGen/RTOS2/src/rtx_os.txt

@@ -181,6 +181,12 @@ static uint32_t mq_mem[osRtxMessageQueueMemSize(MSG_COUNT, sizeof(msg_item_t))/4
 /*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
 /**
 \def osRtxErrorStackUnderflow
+
+*/
+
+/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
+/**
+\def osRtxErrorStackOverflow
 \brief Stack overflow, i.e. stack pointer below its lower memory limit for descending stacks.
 \details
 This error identifier is used with \ref osRtxErrorNotify when RTX5 detects a thread stack overflow.
@@ -256,7 +262,7 @@ error function \b osRtxErrorNotify for an object specified by parameter \a objec
 The parameter \a code passes the actual error code to this function:
 | Error Code                        | Description                                                                       |
 |-----------------------------------|-----------------------------------------------------------------------------------|
-| \ref osRtxErrorStackUnderflow     | Stack overflow detected for thread (thread_id=object_id)                          |
+| \ref osRtxErrorStackOverflow      | Stack overflow detected for thread (thread_id=object_id)                          |
 | \ref osRtxErrorISRQueueOverflow   | ISR Queue overflow detected when inserting object (object_id)                     |
 | \ref osRtxErrorTimerQueueOverflow | User Timer Callback Queue overflow detected for timer (timer_id=object_id)        |
 | \ref osRtxErrorClibSpace          | Standard C/C++ library libspace not available: increase \c OS_THREAD_LIBSPACE_NUM |
@@ -274,7 +280,7 @@ uint32_t osRtxErrorNotify (uint32_t code, void *object_id) {
   (void)object_id;
  
   switch (code) {
-    case osRtxErrorStackUnderflow:
+    case osRtxErrorStackOverflow:
       // Stack overflow detected for thread (thread_id=object_id)
       break;
     case osRtxErrorISRQueueOverflow:

+ 3 - 3
CMSIS/RTOS2/RTX/Config/RTX_Config.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018 Arm Limited. All rights reserved.
+ * Copyright (c) 2013-2021 Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -17,7 +17,7 @@
  *
  * -----------------------------------------------------------------------------
  *
- * $Revision:   V5.1.0
+ * $Revision:   V5.1.1
  *
  * Project:     CMSIS-RTOS RTX
  * Title:       RTX Configuration
@@ -40,7 +40,7 @@ __WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) {
   (void)object_id;
 
   switch (code) {
-    case osRtxErrorStackUnderflow:
+    case osRtxErrorStackOverflow:
       // Stack overflow detected for thread (thread_id=object_id)
       break;
     case osRtxErrorISRQueueOverflow:

+ 2 - 1
CMSIS/RTOS2/RTX/Include/rtx_os.h

@@ -393,7 +393,8 @@ extern osRtxObjectMemUsage_t osRtxMessageQueueMemUsage;
 //  ==== OS External Functions ====
  
 // OS Error Codes
-#define osRtxErrorStackUnderflow        1U  ///< Stack overflow, i.e. stack pointer below its lower memory limit for descending stacks.
+#define osRtxErrorStackUnderflow        1U  ///< \deprecated Superseeded by \ref osRtxErrorStackOverflow.
+#define osRtxErrorStackOverflow         1U  ///< Stack overflow, i.e. stack pointer below its lower memory limit for descending stacks.
 #define osRtxErrorISRQueueOverflow      2U  ///< ISR Queue overflow detected when inserting object.
 #define osRtxErrorTimerQueueOverflow    3U  ///< User Timer Callback Queue overflow detected for timer.
 #define osRtxErrorClibSpace             4U  ///< Standard C/C++ library libspace not available: increase \c OS_THREAD_LIBSPACE_NUM.