6 years ago.

Anyone got fat filesystem working with SD-card on DISCO-F746NG?

Hi,

I've struggled now for many weeks trying to get SD-card and FAT filesystem to work with the DISCO-F746NG and mbed-os.

I got Dieter Graefs demo program to work: https://os.mbed.com/users/DieterGraef/code/DISCO-F746NG_SDFileSystem/shortlog/ But only with that version of BSP_DISCO_F746NG and only with that version of mbed.bld.

Now I would like to run it with rtos, but if I try to compile it with the mbed-os library, I get the following errors:

Error: Class "FATFileSystem" has no member "_ffs" in "SDFileSystem/FATFileSystem/ChaN/diskio.cpp", Line: 25, Col: 37 For sure it has that member, question is what it is that collides with mbed-os to make the compiler throw this error.

I've done a tone of searching, tested numerous libs and programs here on the mbed community and none that I've found works with the latest mbed-os and BSP_DISCO_F746NG.

I even tried to write a wrapper for the block device class to make it compatible with BSP_DISCO_F746NG but didn't get that to work. it's a pity it wasn't written to be compatible in the first place... :/

Any help would be very much appreciated! Thanks!

1 Answer

6 years ago.

Hello Olle,

Have you tried the following example published by Roy Krikke?
https://os.mbed.com/users/roykrikke/code/DISCO-F746NG_BLOCK_DEVICE_WITH_FAT_FILES/

NOTE: Be aware that it has been reported a bug when using SD card with high frequency boards.

Thanks A LOT! :D this was beginning to give me grey hair! :D

posted by Olle Sköld 12 Apr 2018

I was a bit quick, although the example works and writes to the SD-card, the FAT file system that it writes to the SD-card is unrecognized by Windows. Vice versa, a FAT file system formatted in Windows cannot be read by the example... :( I'm going to try to figure out why, but if you have any hints, that would be very much appreciated.

posted by Olle Sköld 12 Apr 2018

Maybe formatting the SD card for the FAT file system with the SD Formatter utility could help.

posted by Zoltan Hudak 12 Apr 2018