# In my openocd.cfg proc app_rtos_restart { } { echo "restarting rtos awareness..." $_TARGETNAME configure -rtos none $_TARGETNAME configure -rtos FreeRTOS } # in GDB: (gdb) mon $_TARGETNAME configure -rtos none (gdb) mon $_TARGETNAME configure -rtos FreeRTOS (gdb) mon app_rtos_restart restarting rtos awareness... invalid command name "$_TARGETNAME" Protocol error with Rcmd (gdb)