Hello @tsuna,
Thanks for having reported.
You're right, I've been able to reproduce the issue. I assume the duplication of #include "usb_device.h" is due to the activation of both USB and FreeRTOS middleware.
This misbehavior will be reported internally to be fixed. I'll keep you posted with the updates.
Sorry for any inconvenience that this may cause.
Meanwhile, trying with the previous STM32CubeMX version 6.2.1, the issue doesn't occur:
- #include "usb_device.h" is generated just once.
- HAL_RTCEx_SetWakeUpTimer_IT () is correctly generated in MX_RTC_Init () .
Khouloud.