owaisfazal wrote on Wednesday, January 28, 2015:
Thanks for the response,
I am using the FreeRTOS+FAT FS so the file system is designed for RAM but I have modified it to work with SD card by providing read and write low level functions. i am not sure how to do the stack checking if you could please guide me in this regard. Also the problem does not occur while initializing the SD card which is the following part
void vInitializeSDCard( void )
unsigned char ucStatus;
//! Initialize the SD card and create the volume
ucStatus = f_initvolume( sd_init );
// It is expected that the volume is not formatted.
if( ucStatus == F_ERR_NOTFORMATTED )
//! Format the created volume with FAT32 FS.
ucStatus = f_format( F_FAT32_MEDIA );
if( ucStatus == F_NO_ERROR )
pstring("SD card initialized");
else if( ucStatus != F_NO_ERROR )
printf("Error No. %d occurred in SD Card initialization\r\n", ucStatus);
after this I try to open a file on my SD card which in case of optimization level (-O1) opens successfully whereas in case of optimization set to None(-O0) the following call returns a NULL
pxFile = f_open( cFileName, “r” );
I believe there is something I am missing. If so, please do let me know.