diff --git a/os/various/shell/shell.c b/os/various/shell/shell.c index 2df34d221..19db9aae3 100644 --- a/os/various/shell/shell.c +++ b/os/various/shell/shell.c @@ -340,6 +340,10 @@ THD_FUNCTION(shellThread, p) { char *lp, *cmd, *tokp, line[SHELL_MAX_LINE_LENGTH]; char *args[SHELL_MAX_ARGUMENTS + 1]; +#if !defined(_CHIBIOS_NIL_) + chRegSetThreadName(SHELL_THREAD_NAME); +#endif + #if SHELL_USE_HISTORY == TRUE *(scfg->sc_histbuf) = 0; ShellHistory hist = { diff --git a/os/various/shell/shell.h b/os/various/shell/shell.h index cecf5969b..d11adc08a 100644 --- a/os/various/shell/shell.h +++ b/os/various/shell/shell.h @@ -106,6 +106,13 @@ #define SHELL_NEWLINE_STR "\r\n" #endif +/** + * @brief Default shell thread name. + */ +#if !defined(SHELL_THREAD_NAME) || defined(__DOXYGEN__) +#define SHELL_THREAD_NAME "shell" +#endif + /*===========================================================================*/ /* Derived constants and error checks. */ /*===========================================================================*/ diff --git a/readme.txt b/readme.txt index b12b223ea..5b1d6b796 100644 --- a/readme.txt +++ b/readme.txt @@ -74,6 +74,7 @@ ***************************************************************************** *** Next *** +- NEW: Added an option to change the shell thread name. - NEW: Made bus acquire/release functions in SNOR driver public. - NEW: Added mcuconf.h generator for STM32L052/L053/L062/L063. - NEW: Added mcuconf.h generator for STM32L072/L073.