cancel
Showing results for 
Search instead for 
Did you mean: 

Managing STM32 USB device library

STM32_dude
Associate II

I'm just using whatever USB device library comes with my latest Cube setup.  How do I find out which device library version I have, and change that (either get the latest version or roll back to a previous version)?  Is there a doc that explains this?

[ FWIW, the USB device library does not show up as a package in the CubeMX repository manager ]

Thanks

 

4 REPLIES 4
Pavel A.
Evangelist III

For most STM32 families the USBD library is in subdirectory of the Cube Firmware package, and is not a sub-package or module - for example F0:

https://github.com/STMicroelectronics/STM32CubeF0/tree/master/Middlewares/ST/STM32_USB_Device_Library

For other families the library comes from this repo https://github.com/STMicroelectronics/stm32_mw_usb_device

In either case its version can be found in Release_Notes.html  in the root. 

To get the latest version or roll back to a previous version: you probably want to check out these git repos from github and use that as the Cube firmware library location for your projects.

A Cube firmware library installed via CubeIDE/MX basically matches one of tags (versions) of these repos, but is not a git repo and cannot be managed with git.

Thanks Pavel.  I found the USBD library in the Cube repository folder, and for the latest WB55 Cube repository for example, it's older than the one on github.

What do you mean by "use that as the Cube firmware library location for your projects".  IOW, if I download and extract the newest one from github into some other folder, how to I tell CubeMX to use one over the other?

 

Pavel A.
Evangelist III

>What do you mean by "use that as the Cube firmware library location for your projects"

In CubeMX/CubeIDE .ioc project, on the "project manager" tab there's a path to the Cube Firmware package for the selected MCU. By default, CubeMX/IDE downloads these packages to the default directory and sets the path there. You can point this path to your repository instead, per project.  It will be used next time when the code is generated.

 

Ah I see what you're saying. But that means I can only use the latest USBD library that comes with the latest Cube repository for my device. Still not sure how to swap to a different USBD library (only) that's not part of my device's current Cube repository.