Arm Mbed OS support forum

Bluepill board support for Mbed OS 6

Hello,

the Bluepill (STM32F103C8) module is supported as a custom board for Mbed OS 6. You can find the repository at mbed-os-bluepill.

Best regards, Zoltan

2 Likes

Hi Zoltan

With mbed-os-6.1.0, Bluepill support should be even easier!
You should only keep PeripheralPins.c and PinNames.h,
then, custom_target has only to inherit from “MCU_STM32F103x8”

3 Likes

Hello Jerome,

Thank you for the notice and making life easier!

Best regards, Zoltan

Would it be possible for this to be updated for Mbed OS 6.2? I tried keeping only PeripheralPins.c and PinNames.h and changing the target inheritance as Jerome suggested, and I got blinky working but USB does not work for me.

Hello,

Thank you for the feedback. mbed-os-bluepill is now updated to Mbed OS 6.2.0.

Best regards, Zoltan

1 Like

Thank you for the update. I still seem to have a problem with USB. The following code works fine on the ST L475 board, but not on a Bluepill with your target configuration:

https://pastebin.com/SF6CayeH

Here’s the Linux kernel output:

[3165.055171] usb 1-1.3: new full-speed USB device number 36 using xhci_hcd
[ 3165.135362] usb 1-1.3: device descriptor read/64, error -32
[ 3165.323206] usb 1-1.3: device descriptor read/64, error -32
[ 3165.511339] usb 1-1.3: new full-speed USB device number 37 using xhci_hcd
[ 3165.591343] usb 1-1.3: device descriptor read/64, error -32
[ 3165.779243] usb 1-1.3: device descriptor read/64, error -32
[ 3165.887440] usb 1-1-port3: attempt power cycle
[ 3166.491330] usb 1-1.3: new full-speed USB device number 38 using xhci_hcd
[ 3166.491515] usb 1-1.3: Device not responding to setup address.
[ 3166.699506] usb 1-1.3: Device not responding to setup address.
[ 3166.907313] usb 1-1.3: device not accepting address 38, error -71
[ 3166.987301] usb 1-1.3: new full-speed USB device number 39 using xhci_hcd
[ 3166.987486] usb 1-1.3: Device not responding to setup address.
[ 3167.195510] usb 1-1.3: Device not responding to setup address.
[ 3167.403314] usb 1-1.3: device not accepting address 39, error -71
[ 3167.403471] usb 1-1-port3: unable to enumerate USB device

Hello,

The BLUEPILL custom target is based on (inherits from) the officially supported MCU_STM32F103x8 target which does not implement a USBDEVICE. You can verify that in the https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json file. By the way, neither the official NUCLEO_F103RB target implements a USBDEVICE. On the other hand, for the officially supported DISCO_L475VG_IOT01A target Mbed OS 6 implements a USBDEVICE. That’s why the https://pastebin.com/SF6CayeH code compiles.

Best regards, Zoltan

The code compiles fine for both the BLUEPILL target and the NUCLEO_F103RB target, it just doesn’t work correctly. Is this something that could be added in the BLUEPILL target? Or must it be added in the base MCU_STM32F103x8 target?