Closed pawelszramowski closed 2 years ago
Ali, I have discovered this Issues, quite old ! Can you check in a first step with Aymen if this problem has already been taken into account ? Regards Christophe
Hi @pawelszramowski,
Thank you for your report. May I know the MCU target you are using? This way, the issue will be transferred to the appropriate repository and deeper analyzed.
With regards,
@ALABSTM, this is not related to a particular microcontroller. As I wrote, it affects files %ProgramFiles%\STMicroelectronics\STM32Cube\STM32CubeMX\db\templates\usbdconf*_c.ftl
and %UserProfile%\STM32Cube\Repository\STM32Cube_FW_F3_V1.11.0\Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Src\usbd_cdc.c
thus project for any MCU generated using these files will be affected too.
Hi @pawelszramowski,
Thank you for the precision. Indeed, the issue might impact more than one firmware in particular. I asked my question simply because with the way-of-work we defined, such issues are handled at STM32Cube..
repository-level, not at this one's.
Once the issue confirmed and logged into our internal database, we will surely spread the fix to any other firmware impacted. I noticed you have mentioned the STM32Cube_FW_F3_V1.11.0
. I will then transfer this issue to the STM32CubeF3 repository
.
Thank you for your comprehension and thank you again for having reported the point.
With regards,
Hi @pawelszramowski,
The issue you reported has been reproduced using the C++ compiler of EWARM v8.32.4 (an even older version than the one you are using). Your report will be forwarded to our development teams. I will get back to you as soon as I have their feedback.
With regards,
Hi @pawelszramowski,
Our development teams confirmed the cast is missing. This will be logged into our internal database and a fix will be made available in the frame of a future release.
With regards,
ST Internal Reference: 105369
ST Internal Reference: 105621
Hi @pawelszramowski,
I hope you are fine. Back to you about what you reported. Our development teams agreed to fix the point at USB Device library-level, but not at application-level as this would impact USB applications of all firmware packages and the Cube MX tool itself.
The fix has been published in the frame of v2.9.0 of the stm32_mw_usb_device library. Please notice that current version is v2.10.0.
Regarding the STM32CubeF3 firmware, integrated USB Device library version is v2.5.3. Unfortunately, there is no plan to integrate a newer version. However, all v2.y.z versions are compatible. Hence, you can get latest updates from the link above and integrate them into your firmware package if needed.
I hope all this helps. Please allow me to close this issue now. Thank you for your comprehension and thank you again for having reported.
With regards,
Since
void*
is not implicitly convertible to other pointers, missing(PCD_HandleTypeDef *)
casts cause build errors in C++ compiler (I used IAR EW for Arm 8.50.1) when USB is used. This affects the following files:Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c
included in firmware packages downloaded by STM32CubeMX and copied to or referenced by user projects. ReplacePCD_HandleTypeDef *hpcd = pdev->pData;
withPCD_HandleTypeDef *hpcd = (PCD_HandleTypeDef *)pdev->pData;
to fix it.usbd_conf.c
generated fromdb/templates/usbdconf*_c.ftl
templates in STM32CubeMX installation directory. Replace(HAL_PCD_.*\()(pdev->pData)
with$1\(PCD_HandleTypeDef \*\)$2
using regular expressions to fix it inHAL_PCD_*
function calls.