In the attachment is an example that I have worked out for using a SD card as a data storage device in the FreeRTOS+FAT-SL. The example is based on SAM4S-EK2 board from Atmel. The example includes very basic functions for reading and writing to the SD card same as the ones in the example provided with FreeRTOS download. Please remove the additional functions included in the example as per requirement. Please also provide feedback if any improvement is required.
SAM4S-EK C Ex.zip