AnsweredAssumed Answered

FreeRTOS_CLIRegisterCommand not working

Question asked by Jenny Rendall on Oct 23, 2018
Latest reply on Oct 26, 2018 by Jenny Rendall

 I am following this tutorial and have 

1. Implemented a Command

 

static BaseType_t prvTaskStatsCommand( int8_t *pcWriteBuffer,

                                          size_t xWriteBufferLen,

                                          const int8_t *pcCommandString )

{

    ( void ) xWriteBufferLen;

    return pdFALSE;

}

2.  created the mapping

static const CLI_Command_Definition_t xDelCommand =

{

    "abc",

    "del <filename>: Deletes <filename> from the disk\r\n",

      prvTaskStatsCommand,

    1

};

3.  registered with FreeRTOS+CLI 

 

void vRegisterCLICommands( void )

{

 

int a = FreeRTOS_CLIRegisterCommand( &xDelCommand );

printf("hello world %i\n", a);

}

 

I put vRegisterCLICommands() in main and the printout is "hello world 1", indicating the registration is successful.

 

Then I tried

help abc

in the debug console in MCUXpresso, but abc is not there. This is what I got

Undefined command: "abc".  Try "help".

why FreeRTOS_CLIRegisterCommand is not working?

what should I do after register the command with FreeRTOS_CLI?

Outcomes