Skip to main content
Associate
May 28, 2025
Solved

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

  • May 28, 2025
  • 2 replies
  • 978 views

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!

Best answer by FBL

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.

 

2 replies

Technical Moderator
May 29, 2025

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.Best regards,FBL
nsaAuthor
Associate
May 29, 2025

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

 

FBLBest answer
Technical Moderator
May 29, 2025

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.Best regards,FBL