File Handling in freertos

char  *DUMMY_DATA= "./dir_x/Series.bin";
vSendString("FILE_CHECK0");
FF_FILE *pxFile;
int iString;
const int iMaxStrings = 1000;
char pcReadString[ 20 ], pcExpectedString[ 20 ], *pcReturned;
pxFile = ff_fopen("SERIES.bin" , "r" );
if( pxFile != NULL ){
	vSendString("FILE_CHECK0");
	exit(1);
}

Hello guys,
First of I trying experiment around RTOS. I need to run a simple text file in freeRtos.I am trying to run on QEMU-virt Board. My task are declared correctly i can run RX and TX data, but when i try file handling the execution just hangs.
Thank you!!!

What is the processor doing when it hangs? Pause the debugger - what is executing - could just be you have hit an assert().

Thank you for the reply,
I am just trying to read a .txt file , but instead of using stdio.h i am using ff_stdio.h.
How can i debug it?

As Richard already mentioned, can you break your program in debugger when it appears hang and see what it is doing?

I tried to debug the code using gdb but i cannot see the flow

What do you mean by you cannot see the flow? Can you share the callstack when you break in GDB? You should be able to get the callstack using backtrace command in gdb.

$ gdb -q RTOSDemo
Reading symbols from RTOSDemo…
(gdb) run
Starting program: FreeRTOS/Demo/RISC-V-Qemu-virt_GCC/build/RTOSDemo
Failed to read a valid object file image from memory.
[New LWP 23442]

Thread 1 “RTOSDemo” received signal SIGILL, Illegal instruction.
0x00007ffff7c319fa in ?? ()

this is what i get when i try with gdb

I assume you are using this project. If so, can you use the instructions in this readme file for building and debugging - FreeRTOS/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC at main · FreeRTOS/FreeRTOS · GitHub