BlockDevice classes (and all mbed features) should be moved to the mbed namespace and should not #include "mbed.h" https://github.com/ARMmbed/mbed-os/blob/42d77ecd134acae07d9e99f87b0606c454bea00e/features/filesystem/bd/BlockDevice.h#L43