2025-08-20 6:47 AM
Hi @stforum @stforum2 @Mahmoud Ben Romdhane
Good evening.
I am working on an STM32F765VGT6 microcontroller using STM32CubeIDE v1.19.0 on Windows 10 Pro. The project requires enabling both Ethernet (ETH) and USB Custom HID functionalities.
On 22 July 2025, I received an email from the ST Community recommending an update to STM32CubeIDE. At that time, I was using v1.17.0, and I proceeded to update to v1.19.0 as advised.
Problem Faced:
Today, I encountered an issue where the middleware files related to LWIP and USB HID became corrupted, even though I was working in a different workspace.
Due to this corruption, I am unable to restore my previous working code and also unable to access Ethernet and HID functionalities.
This issue has occurred after updating to STM32CubeIDE v1.19.0.
Now neither i can get back older version of code nor creating a new one which is working.
Request for Assistance:
Could you please advise on how to resolve this issue? Specifically:
How can I repair or reinstall the corrupted middleware (LWIP and USB HID) components?
Is there a way to recover the middleware in existing or new projects?
Should I consider rolling back to an earlier IDE version (e.g., v1.17.0), and if so, how?
Thanks & Regards,
Manogna V
2025-08-21 1:14 AM
Hello @Manogna_V
Could you please share your project files with us? This will help us better understand the issue and investigate what might be going wrong. Additionally, could you clarify what you mean by "the corrupted middleware"? Any specific details or error messages you can provide would be very helpful for our analysis.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-08-21 5:30 AM - edited 2025-08-21 5:33 AM
Hello @Ghofrane GSOURI,
Thanks for your reply.
I would like to explain my issue in detail:
For the past year, I have been using STM32CubeIDE v1.17.0. At that time, I generated code for custom HID and Ethernet, and since then, I have not regenerated or modified any code related to ETH or HID configurations.
Recently, I received an email from ST recommending an update to the latest STM32CubeIDE v1.19.0 (screenshot attached). I updated my IDE as suggested.
Two days ago, I created a new project with ETH and HID enabled. During code generation, both the CubeMX version and the STM32Cube_FW package were updated to the latest versions. This replaced the middleware files and resulted in multiple syntactical errors (mainly in function arguments). Because of these changes, my customized code is no longer compatible, and the HID device is failing to be detected.
The major issue is that—even though the new project was created in a separate workspace—the old project in another workspace also got affected. The middleware files in that old project were automatically updated to the new version, even though I never regenerated code there. As a result, I have lost access to my original working code.
Since attaching a zip file of my project will also regenerate middleware files according to the reviewer’s version of CubeIDE, I am instead providing the paths where my project files are located:
Currently, I am working with STM32CubeIDE v1.19.0.
Could you please advise how I can:
Retrieve or restore my original code (middleware + custom modifications), or
Recreate the same working instance of my old project in this updated environment.
Your guidance on this would be greatly appreciated.
Best regards,
Manogna V
2025-08-21 6:25 AM
Hello @Manogna_V
STM32CubeIDE 1.17.0 ( integrates CubeMX 6.13.0) means you used to work with the firmware version STM32Cube_FW_F7_V1.17.2 as specified in the release notes
First, check if this firmware is already present on your PC under C:\Users\<YourUsername>\STM32Cube\Repository. If it’s missing, download it from this LINK
extract the .zip file, and place the extracted folder (named exactly STM32Cube_FW_F7_V1.17.2) in the repository directory.
After that, open your project in STM32CubeIDE 1.19.0, open your .ioc file, and navigate to the Project Manager. Uncheck the option "Use latest available version," then select STM32Cube_FW_F7_V1.17.2 as the firmware version and generate your code.
Please try this workaround and let me know the results, so we can address any further issues if they arise.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-08-21 11:34 PM - edited 2025-08-21 11:36 PM
Hi @Ghofrane GSOURI ,
Good Morning,
I have followed all the above steps that you have mentioned but still I am facing issues as mentioned below especially mismatch in the HID middleware files
../Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/usbd_customhid.c:723:80: note: expected 'uint8_t' {aka 'unsigned char'} but argument is of type 'uint8_t *' {aka 'unsigned char *'}
../Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/usbd_customhid.c:723:4: error: too few arguments to function '((USBD_CUSTOM_HID_ItfTypeDef *)pdev->pUserData[pdev->classId])->OutEvent'
723 | ((USBD_CUSTOM_HID_ItfTypeDef *)pdev->pUserData[pdev->classId])->OutEvent(hhid->Report_buf);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/usbd_customhid.c:790:82: note: expected 'uint8_t' {aka 'unsigned char'} but argument is of type 'uint8_t *' {aka 'unsigned char *'}
../Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/usbd_customhid.c:790:6: error: too few arguments to function '((USBD_CUSTOM_HID_ItfTypeDef *)pdev->pUserData[pdev->classId])->OutEvent'
790 | ((USBD_CUSTOM_HID_ItfTypeDef *)pdev->pUserData[pdev->classId])->OutEvent(hhid->Report_buf);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/subdir.mk:19: Middlewares/ST/STM32_USB_Device_Library/Class/CustomHID/Src/usbd_customhid.o] Error 1
"make -j24 all" terminated with exit code 2. Build might be incomplete.
12:02:12 Build Failed. 3 errors, 2 warnings. (took 957ms)
Could you please help me to resolve this issue?
Thanks in advance
Manogna V
2025-08-22 12:16 AM
Hello @Manogna_V
Ensure that all middleware files (such as `usbd_customhid.c` and `usbd_customhid.h`) in your project are from the same firmware version (**STM32Cube_FW_F7_V1.17.2**). To do this, delete the existing `usbd_customhid.c` and `usbd_customhid.h` files from your project. Then, navigate to:
- `C:\Users\XXXXX\STM32Cube\Repository\STM32Cube_FW_F7_V1.17.2\Middlewares\ST\STM32_USB_Device_Library\Class\CustomHID\Src`
- Copy the `usbd_customhid.c` file from this directory and paste it into your project’s corresponding source folder.
- `C:\Users\XXXXX\STM32Cube\Repository\STM32Cube_FW_F7_V1.17.2\Middlewares\ST\STM32_USB_Device_Library\Class\CustomHID\Inc`
- Copy the `usbd_customhid.h` file from this directory and paste it into your project’s corresponding include folder.
By ensuring that these files are directly taken from the correct firmware version, you can avoid compatibility issues and function signature mismatches.
Please try this workaround and let me know the results.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-08-22 2:11 AM - edited 2025-08-22 3:30 AM
Hi @Ghofrane GSOURI ,
I have followed all the steps that you have mentioned in the previous post but still facing same function signature mismatch
even though I have modified the function prototype
It is mandatory that I need to use my custom files only as I have implemented according to our requirement and it is successfully worked
After this version update of cubeide I am facing this issue
PFA, of my HID customized middleware files
Please help me in resolving this