mBed os 5 - write read UBS stick

dear community,

I need to write and read some files on a external flash, a commercial UBS stick.

my setup:

I can’t find any working example for mBed os 5
I’ve been trying many different solutions without any success.
why here it’s given only one example with a sd card?

I can manage to work with this library
I just need to operate with files on the USB stick, rather than on the local flash, risking to burn it after few thousands of cycles…

thank you in advance


The constructor of the USBMSD accept any BlockDevice so you can combinete it with any BlockDevice APIs from Storage - APIs
But from my point of view for the USB Stick you need a USBHOST library. But Mbed provide only USBDEVICE APIs.

The easiest for the moment is to use an SD card - SDBlockDevice - APIs | Mbed OS 5 Documentation.

You can also found some old library like USBHOST - USBHOST lib for STM | Mbed where also exit LPC1768 implementation. I have no idea if it works or not.

BR, Jan