Skip to main content
gary239955
Associate II
August 25, 2026
Question

USB Virtual COM Port on STM32C071

  • August 25, 2026
  • 1 reply
  • 8 views

I want to use the example project Ux_Device_CDC_ACM.ioc as the basis of a project to create a Virtual COM Port to bridge USB to UART. I made sure I downloaded the patch version stm32cubec0-v1-4-1. I opened the project in CubeMX. I corrected the USBX Platform Settings to USB, then went straight to generate code for IAR EWarm, as I usually do. Again, as usual, I began by trying to compile the generated project, which has always worked for me before. But I get Ux_Device_CDC_ACM - Ux_Device_CDC_ACM        build_ide.ninja:118: multiple rules generate C:/Users/garyd/Downloads/stm32cubec0-v1-4-1/STM32Cube_FW_C0_V1.4.0/Projects/NUCLEO-C071RB/Applications/USBX/Ux_Device_CDC_ACM/EWARM/Ux_Device_CDC_ACM/Obj/STM32C0xx_HAL_Driver_13552679092417003011.dir/stm32c0xx_hal.o        Any ideas?


 

1 reply

Florian LR
ST Employee
August 25, 2026

Hi ​@gary239955,

One thing I noticed is that although you're using the STM32CubeC0 v1.4.1 patch release, the error path still references STM32Cube_FW_C0_V1.4.0, which may indicate a mix of package versions or an issue in the generated project files.

The error itself (multiple rules generate ... stm32c0xx_hal.o) suggests that the Ninja build system is trying to generate the same HAL object file twice, typically because the source file has been added to the build more than once during code generation.

If you check the file build_ide.ninja around line 118, do you see stm32c0xx_hal.c (or stm32c0xx_hal.o) appears more than once?

Best regards,

Florian LR