Help to implement FreeRTOS + CLI in Arduino

taimar198 wrote on Saturday, November 23, 2019:

hi there, I’m beginner . Recently, I have researched about FreeRTOS + CLI, but I do not know how to implement it in Arduino or what hardware is required to implement it. Please help me. Thank in advance.

rtel wrote on Saturday, November 23, 2019:

FreeRTOS+CLI is a basic command interpreter framework that is separate
from the input/output method. So you need to provide a method for users
to enter strings that you pass to the command interpreter, and a method
to print strings generated by the command interpreter. There are
several examples in the FreeRTOS download. If you want to input and
output using a serial port then you can start by plugging Arduino
specific UART read and write functions into this file:
https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c

You would need to provide an implementation of xSerialPortInitMinimal(),
vSerialPutString(), xSerialPutChar(). The mutex is only needed if you
are going to have more than one input and output method - say UART and
UDP at the same time.

taimar198 wrote on Sunday, November 24, 2019:

what about CLI + IO? how can i do that? I mean, when i input string in CLI: “turn off led1” then the led 1 is off.

rtel wrote on Sunday, November 24, 2019:

You can implement the commands that are executed in response to the
command strings in any way you like. When you register a command you
map a string to a function that is called when that string is entered,
so in this case the string could be “LED <on|off>” and the function
called either turns the LED on or off depending on the entered command
parameter. Click each of the instruction steps on this page to read how
to do it.
https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_CLI/FreeRTOS_Plus_Command_Line_Interface.html

taimar198 wrote on Sunday, November 24, 2019:

thanks. but i cant understand how to connect to my arduino uno. Do you have the video about that?

taimar198 wrote on Sunday, November 24, 2019:

thanks. but i cant understand how to connect to my arduino uno. Do you have the video about that?

rtel wrote on Sunday, November 24, 2019:

thanks. but i cant understand how to connect to my arduino uno. Do you
have the video about that?

Sorry, no video on hardware specifics, this forum is dedicated to
FreeRTOS support so if you have an Arduino specific hardware question I
would recommend asking on the Arduino forum.