This is an automated email from Gerrit.

"Asier Llano <asierll...@gmail.com>" just uploaded a new patch set to Gerrit, 
which you can find at https://review.openocd.org/c/openocd/+/7092

-- gerrit

commit 8343025bd886f0da59ac43a68252a9f831240e60
Author: Asier Llano <all...@hubbell.com>
Date:   Thu Jul 21 12:27:11 2022 +0200

    rtos: Support for "none" rtos
    
    After a certain RTOS has been configured there is no mechanism
    to go back to no RTOS support. It may be useful for debugging
    purposes. With the provided modification, the "none" option
    of RTOS is provided as a valid option.
    
    It has been tested in two different board (Cortex M4 and Cortex M33).
    Documentation has also been updated.
    
    Signed-off-by: Asier Llano <all...@hubbell.com>
    Change-Id: I602210bff31ccadd41c41e9454c52b5fffa1671e

diff --git a/doc/openocd.texi b/doc/openocd.texi
index b213798c31..2acea59b64 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -5145,7 +5145,7 @@ The value should normally correspond to a static mapping 
for the
 
 @anchor{rtostype}
 @item @code{-rtos} @var{rtos_type} -- enable rtos support for target,
-@var{rtos_type} can be one of @option{auto}, @option{eCos},
+@var{rtos_type} can be one of @option{auto}, @option{none}, @option{eCos},
 @option{ThreadX}, @option{FreeRTOS}, @option{linux}, @option{ChibiOS},
 @option{embKernel}, @option{mqx}, @option{uCOS-III}, @option{nuttx},
 @option{RIOT}, @option{Zephyr}
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c
index f401c3d30b..580535f8e1 100644
--- a/src/rtos/rtos.c
+++ b/src/rtos/rtos.c
@@ -140,6 +140,9 @@ int rtos_create(struct jim_getopt_info *goi, struct target 
*target)
        if (e != JIM_OK)
                return e;
 
+       if (strcmp(cp, "none") == 0)
+                       return JIM_OK;
+
        if (strcmp(cp, "auto") == 0) {
                /* Auto detect tries to look up all symbols for each RTOS,
                 * and runs the RTOS driver's _detect() function when GDB
@@ -159,7 +162,7 @@ int rtos_create(struct jim_getopt_info *goi, struct target 
*target)
        res = Jim_GetResult(goi->interp);
        for (x = 0; rtos_types[x]; x++)
                Jim_AppendStrings(goi->interp, res, rtos_types[x]->name, ", ", 
NULL);
-       Jim_AppendStrings(goi->interp, res, " or auto", NULL);
+       Jim_AppendStrings(goi->interp, res, ", auto or none", NULL);
 
        return JIM_ERR;
 }

-- 

Reply via email to