Arm Mbed OS support forum

SDFileSytem library for Mbed Studio OS 6

When I compile/build a program under OS 6 for a SD card functionality, I get errors.
[Error] DirHandle.h@64,13: unknown type name ‘ssize_t’; did you mean ‘size_t’?
[Error] DirHandle.h@77,23: unknown type name ‘off_t’
[Error] DirHandle.h@83,13: unknown type name ‘off_t’
[Error] DirHandle.h@95,9: unknown type name ‘off_t’
[Error] DirHandle.h@97,34: allocation of incomplete type ‘struct dirent’

The SDFileSystem library I used is downloaded from mbed site. This library when used with OS 2 (now deprecated) compile fine in on-line compiler. Which SDFileSystem library version will work with OS 6 ? Any advise/clue is welcome.

Hello Glennon,

Mbed OS 6 supports the FATFileSystem and the LittleFileSystem rather than the SDFileSystem. To use an SD card as storage device a pointer to an SDBlockDevice object shall be passed in the constructor of the selected file system. You can find an example here.

Best regards, Zoltan

1 Like

Hi Zoltan,

Thanks for the update. I will try it out.

Best Regards