rtos: Support for "none" rtos 92/7092/3
authorAsier Llano <allano@hubbell.com>
Thu, 21 Jul 2022 10:27:11 +0000 (12:27 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Mon, 15 Aug 2022 13:19:21 +0000 (13:19 +0000)
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 <allano@hubbell.com>
Change-Id: I602210bff31ccadd41c41e9454c52b5fffa1671e
Reviewed-on: https://review.openocd.org/c/openocd/+/7092
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
doc/openocd.texi
src/rtos/rtos.c

index 1d63b20b7a2d2c44c1a8828720ce78d2840eb2c7..995861d18c063c06d51b87d97c640a5cec901f4b 100644 (file)
@@ -5149,7 +5149,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}
@@ -11848,6 +11848,11 @@ Currently supported rtos's include:
 @item @option{Zephyr}
 @end itemize
 
+At any time, it's possible to drop the selected RTOS using:
+@example
+$_TARGETNAME configure -rtos none
+@end example
+
 Before an RTOS can be detected, it must export certain symbols; otherwise, it cannot
 be used by OpenOCD. Below is a list of the required symbols for each supported RTOS.
 
index 013080bb0caf46eaf5b86a8d21f9dc2b900115b7..3e43e828d1baeed460c5718c49e2b5849b04b1b7 100644 (file)
@@ -129,6 +129,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
@@ -148,7 +151,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;
 }

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)