cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5 Series - Using Classic USB Device Middleware for Bare Metal Bootloader

nsa
Associate

Hello ST Community,

I'm developing a simple bootloader for the STM32U599 that requires USB serial communication (CDC class) for firmware updates.

Current Situation:

  • STM32CubeMX only offers USBX middleware for STM32U5 series.
  • We have an existing, working USB driver implementation based on the classic STM32 USB Device Library (CDC class)

Questions:

  1. Is it possible to use the classic STM32_USB_Device_Library with STM32U5 series instead of USBX?
  2. Can we port our existing USB CDC driver  to STM32U5 without major architectural changes?
  3. Are there any STM32U5-specific examples using the classic USB Device middleware for bare metal applications?

Requirements:

  • Bare metal implementation (no RTOS)
  • USB CDC Virtual COM Port functionality
  • Minimal flash/RAM footprint for bootloader use
  • Compatibility with existing USB driver codebase

I've seen references to the STM32U5 Classic CoreMW package on GitHub, but wanted to confirm the best approach for our use case.

Any guidance or examples would be greatly appreciated!

Hardware: STM32U599 Tools: STM32CubeIDE, STM32CubeMX

Thanks in advance for your help!

3 REPLIES 3
FBL
ST Employee

Hello @nsa 

  1. 3. You can start with this repository using the classic USB Device middleware and bare metal applications.
  2. The recommended approach is to use the STM32U5 Classic Core MW Package: Start with a minimal CDC echo example to validate USB enumeration and data transfer. Typically, to minimize the footprint, strip unnecessary features from the USB stack, focus solely on the CDC class, and use compiler optimizations to reduce flash usage. Ensure debug logs are disabled to save resources. 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


nsa
Associate

Hello @FBL ,

Is there a way to access this Core MW package from cube MX? Currently under softwrae packs for u5 I cannot see this from cube mx.

nsa_0-1748523429565.png

 

FBL
ST Employee

Hi @nsa 

No, this package is exclusively published on GitHub (and is neither available in STM32CubeU5, STM32CubeMX nor available on www.st.com). It contains the integration of the Classic CoreMW stacks with STM32U5 devices, allowing users to get quick access to pre-built projects integrating them.

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.