6 years, 5 months ago.

FAT file system on DISCO_F746NG

Hi,

I received the lovely DISCO_F746NG dev board a couple of days ago. I've tested the example applications using the BSP_DISCO_F746NG lib, and most works.

My question now is, how do I use FAT file system in mbed-os together with this board? The block read/write/format example (DISCO_F746NG_SD_demo) works fine, but I don't understand how to combine the SD_DISCO_746NG lib with for example the FATFileSystem lib.

Is the BSP_DISCO_F746NG lib at all required when using mbed-os? I could not find any example that uses both FAT file system and the built in SD-card slot on this board.

I assume that the BSP_DISCO_F746NG provides an abstraction layer so I guess I should not have to use a lib that addresses the pins directly?

Thanks!

1 Answer

6 years, 4 months ago.

You will need to implement the BlockDevice class for your board, unfortunately the SD_DISCO_746NG library has not done this yet.

However, implementing it seems very straight forward, as you can just wrap around WriteBlocks and friends.

After implementing the BlockDevice you can mount FATFileSystem (or LittleFS) to it.

Accepted Answer