aboutsummaryrefslogtreecommitdiff
path: root/src/rtos
diff options
context:
space:
mode:
authorAsier Llano <allano@hubbell.com>2022-07-21 12:27:11 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2022-08-15 13:19:21 +0000
commit6d6207a8d3970beac73840a184af79d8dbeb1fbf (patch)
tree4bc52133fc202b1c589baad545805f5355004376 /src/rtos
parent81aa5fd6b477cb03b718625a48e50099fc2ae0f2 (diff)
downloadriscv-openocd-6d6207a8d3970beac73840a184af79d8dbeb1fbf.zip
riscv-openocd-6d6207a8d3970beac73840a184af79d8dbeb1fbf.tar.gz
riscv-openocd-6d6207a8d3970beac73840a184af79d8dbeb1fbf.tar.bz2
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 <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>
Diffstat (limited to 'src/rtos')
-rw-r--r--src/rtos/rtos.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c
index 013080b..3e43e82 100644
--- a/src/rtos/rtos.c
+++ b/src/rtos/rtos.c
@@ -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;
}