How to use USB on STM32F103C8 & mbed?

I tried just to:

#include <USBSerial.h>

It used internal mbed-USBDevice library from mbed framework source tree. I’ve received “Target not supported!” error during build (and a bunch of others).

If I add to platformio.ini:

lib_deps = USBDevice  ; or USBDEVICE

,
it installs the library, but still compiles the files inside features/unsupported/USBDevice/targets/TARGET_STM, and still throws “Target not supported!” error because of this.

By examining the output during build, I see that USBDevice/USBDEVICE libraries from PlatformIO repo (IDs are 2820 and 5028) still depend on mbed-USBDevice.
Is it possible to use USB on STM32F103C8 with mbed?

I’ve found that it’s possible to ignore the built-in mbed library by adding lib_ignore = mbed-USBDevice to platformio.ini.
But USBDevice library still doesn’t compile.
Did someone use USB on STM32F103C8 with mbed?

Hi. Maybe I’m a bit late, but I’m working on port USBSerial to BluePill.

Is this board you’re using?

Did you get any progress ?

Regards,

Yup, I’m using Bluepill, but I haven’t tried anymore because I had other tasks at hand and this one was optional.