Can we use file operations, string operations libraries and some common c library functions in freertos? If yes how?

Can we use file operations, string operations libraries and some common c library functions for a target having gcc port? If yes how?

You can use whatever functions are provided by your C-Runtime. The only thing to keep in mind is ensure that those functions are thread safe if you are calling them from more than one tasks. Otherwise, you need to serialize calls to those functions.

also keep in mind that some c runtime functions (in particular the sprintf() family) are stack hogs, so you may need to allocate significantly more stack with them as opposed to without them.

Please be aware that FreeRTOS provides FAT filesystem through this library: GitHub - FreeRTOS/Lab-Project-FreeRTOS-FAT: This repository contains FreeRTOS+FAT source code, which could be consumed as a submodule.
string and other common c library functions are provided by the GCC standard libraries if you include them. The demo code provided by FreeRTOS makes use of the string functions to print messages over a console (typically a UART)

@RAc wrote:

keep in mind that some c runtime functions (in particular the sprintf() family) are stack hogs

Right, I’ve been there too :frowning:
You may want to have a look at printf-stdarg.c which can be used to replace the [v][s][n]printf() family.
This alternative implementations use very little stack, they are re-entrant, and they can be called from within an ISR.

@aggarg wrote:

keep in mind is ensure that those functions are thread safe

Many aren’t, like strtok() or localtime(). The latter may even call malloc().

Some standard functions may allocate memory by using malloc()/free(). There is an old but still interesting discussion on the FreeRTOS forum about heap and stack.

Good luck