cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U585 USB is OK with Keil; not working with CubeIDE or makefile

CeSium
Associate

Hi! I have a board based on STM32U585CIU, and I'm trying to enable a USB CDC on it. The problem is: when I generate a project in CubeMX for MDK-ARM, the code I've attached works fine, USB CDC device is being recognized by PC, and I can see messages via COM port. However, once I generate it for CubeIDE or Makefile, it just goes to hard fault in MX_USBX_Device_Init. Considering it works in Keil uVision, seems like hardware is completely okay, so there is something in the difference between gcc-arm and arm compiler. 

1 REPLY 1
Andrew Neil
Super User

@CeSium wrote:

Considering it works in Keil uVision, seems like hardware is completely okay, so there is something in the difference between gcc-arm and arm compiler. 


Seems a reasonable hypothesis.

Have you tried debugging the Hard Fault ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.