cancel
Showing results for 
Search instead for 
Did you mean: 

USBX code not compiling after IDE generation

Richard107
Associate

Using STM32 Cube IDE v1.15.1 with package stm32u5-1.5.0 or IDE 1.16.0 with package 1.6.0 (Linux and Windows versions) :

  • Create new STM32 project from example Ux_Device_CDC_ACM for board Nucleo-U5A6ZJ-Q
  • Compile project : ok
  • Slight modification in IOC file just to force code regeneration, for example "Pinout & configuration / Bsp / HMI / USER LED GREEN", save IOC, ALT+K to regenerate code
  • Compile : fail :
    make: *** No rule to make target '.../Ux_Device_CDC_ACM/Drivers/BSP/STM32U5xx_Nucleo/stm32u5xx_nucleo_usbpd_pwr.c', needed by 'Drivers/BSP/NUCLEO-U5A5ZJ-Q/stm32u5xx_nucleo_usbpd_pwr.o'. Stop.
    Some source files have been unexpectedly removed/modified by the regeneration 
  • Undo the modification in IOC, save, regenerate and recompile : still fails (removed/modified files persist).

The complete list of "removed files" by the generation are :

  • Drivers/BSP/STM32U5xx_Nucleo/stm32u5xx_nucleo_usbpd_pwr.c + .h
  • Drivers/STM32U5xx_HAL_Driver/Inc/stm32u5xx_hal_adc.h + Src/.c
  • Drivers/STM32U5xx_HAL_Driver/Inc/stm32u5xx_hal_adc.ex + Src/.c
  • Drivers/STM32U5xx_HAL_Driver/Inc/stm32u5xx_hal_ll_adc.h

Modified files (unexpectedly) by the generation : 

  • Drivers/STM32U5xx_HAL_Driver/Src/stm32u5xx_hal_cortex.c
  • USBPD/Target/usbpd_devices_conf.h (removed macros, seems to have no impact)
  • Some other minor differences (comments, licenses text files)

The same problem occurs for a personal project in which USBX/UCPD is enabled.

User can fix this problem manually by canceling the unexpected remove/modifs done by (re)generation but it is very annoying to do this each time IOC is modified.

1 REPLY 1
Billy OWEN
ST Employee

Hi @Richard107 

 

This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

 

Regards,

Billy