Compile errors when using mbed.h and FatFileSystem

17 Jan 2018

Hello,

First off, thank you very much for reading my post. I'm using an ST Nucleo-F746ZG board as a code development platform that will eventually be ported to a another board. In my application I need to be able to plug a USB Flash drive into the "User" USB port, detect that drive and open a file on it to write test data out to. The Flash drive file system is FAT. At the beginning of my code I #include "USBHostMSD.h". Farther down I try to open a file with the fopen function. When I try to compile I get the following messages:

Warning: Overloaded function "mbed::FileSystemHandle::open" is hidden by "mbed::FATFileSystem::open" virtual function override intended? in "MSCUsbHost/FatFileSystem/FATFileSystem.h", Line: 40, Col: 23

Error: Object of abstract class type "mbed::FATFileHandle" is not allowed in "MSCUsbHost/FatFileSystem/FATFileSystem.cpp", Line: 98, Col: 17

Error: Object of abstract class type "mbed::FATDirHandle" is not allowed in "MSCUsbHost/FatFileSystem/FATFileSystem.cpp", Line: 126, Col: 17

I have tried updating all libraries. Commenting out the code where I'm trying to open the file has no effect. The problem shows up by just including USBHostMSD.h. If I don't include that, the problem goes away.

If anyone has suggestions, I would love to see them.

Thanks in advance for any and all responses.

Perry