Importing FreeRTOS-Plus-CLI to platformio

I’m using platformio to program an arduino nano using a freeRTOS port [here].
Everything is going fine up to the point when I wanted a serial terminal, setting and getting values of some attributes.
freeRTOS provides the FreeRTOS-Plus-CLI which I wanted to try out. I extracted the “FreeRTOS-Plus-CLI” folder into lib folder of my platformio project.
I get immidiately the error, telling me that #include “FreeRTOS.h” cannot be found.
Using some common sense, I replaced #include <FreeRTOS.h> to #include <Arduino_FreeRTOS.h>
The error went away but then I got another error telling me:

error: ‘configCOMMAND_INT_MAX_OUTPUT_SIZE’ undeclared here (not in a function); did you mean ‘configMINIMAL_STACK_SIZE’?

Before going down that route and chaging now that, I wanted to ask here if I’m on the right track or if I’m overcomplicating things.
Thanks in advance.

Hi @takila
In FreeRTOS-Plus-CLI , this macro is used here

The size of the buffer is defined by the configCOMMAND_INT_MAX_OUTPUT_SIZE constant, which should be defined in FreeRTOSConfig.h whenever FreeRTOS-Plus-CLI is used.

configCOMMAND_INT_MAX_OUTPUT_SIZE should be set to 1 to minimise RAM usage if all command interpreter interfaces use their own locally defined buffers, and the FreeRTOS_CLIGetOutputBuffer() API function is not used.

So you can define this macro in your FreeRTOSConfig.h file and check the output of the project.

Ok, so far so good. I was able to create my command, but in the FreeRTOS CLI example, I cannot find the line where FreeRTOS_CLIRegisterCommand is called in order to register my command.

Here it is - FreeRTOS/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/CLI-commands.c at main · FreeRTOS/FreeRTOS · GitHub.

Ok, one final thing. I have copied vCommandConsoleTask from the examples of the CLI and I get the error “Peripheral_Descriptor_t” is undefined. Apparently it belongs to FreeRTOS_IO.h which is deprecated.
The example that is available uses the Peripheral_Descriptor_t along with FreeRTOS_read and write.

Which example are you talking about? Are you saying that this example does not work - FreeRTOS/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/CLI-commands.c at main · FreeRTOS/FreeRTOS · GitHub?

FreeRTOS_Plus_CLI_IO_Interfacing_and_Task.html

Can you instead you the example I linked above as reference? What are you trying to achieve?

What I want to achive in several steps:

  1. Hello world command example.
  2. Make a command that changes the color of an rgb neopixel
  3. Make the controller over a serial interface available to the pc connected to it. Different led patterns will be made according to the command given from the pc to the controller over the serial interface. Primary usecase are the different power states a computer can be in like: on, off, hybernating.

Than you should be able to refer the example I linked. Start with a basic command which prints a message and then add the functionalities one-by-one.