USBComposite library for Official STM32 core?

Working libraries, libraries being ported and related hardware
Post Reply
Posts: 50
Joined: Mon Jun 11, 2018 11:20 am

USBComposite library for Official STM32 core?

Post by profdc9 » Fri Jan 11, 2019 4:07 am


I have searched the forum for about an hour on google trying to find this answer. I figure if its not on the forum, it might be good to have this archived. I am trying to figure out how to get by with the official core to do the things that Roger's core currently does on the Bluepill.

Roger's core supports a USBCDC serial device through the Maple driver. An alternative is to use the arpuss USBComposite library without the SERIAL_USB support. However, the official core does not appear to have a USB library. Does such a thing exist yet, or am I mistaken? The USB CDC support it very helpful and if I am going to transition to the official core then I would like to figure out how to do this. Looking at the current USBComposite library, it does not use the HAL, it uses the Maple USB library, so maybe this is not possible currently. The Maple-type DFU bootloader is not absolutely necessary for me, as I can use a Black Magic Probe or STLINK, but the USB CDC support is very helpful for debugging and interfacing.

Thank you,


User avatar
Rick Kimball
Posts: 1400
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US

Re: USBComposite library for Official STM32 core?

Post by Rick Kimball » Fri Jan 11, 2019 4:48 am

don't hold your breath waiting for it to happen anytime soon: ... /issues/15

Posts: 722
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: USBComposite library for Official STM32 core?

Post by fpiSTM » Fri Jan 11, 2019 5:24 am

Currently no but CDC will be available soon. See PR 388 on github.

User avatar
Posts: 886
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire

Re: USBComposite library for Official STM32 core?

Post by BennehBoy » Fri Jan 11, 2019 10:52 am

as @fpistm states, there's a working PR for CDC now - I'm using this quite well but on boards other than BluePill....

...Like for like, for my project, STM's core consumes 75% more SRAM & ~ 25-30% more flash than the maple based core, this may not be an issue if your projects are relatively small, but my main one is teetering on the brink with this (stack is very close to being stomped on). With that in mind I use Maple for MM/BP, and STM for most of my development... When a very compact F4 board arrives (with schematics!), I'll probably jump completely.

Post Reply