cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Auto-Generated Files for Ethernet and USB Custom HID in STM32CubeIDE

Badrinathan
Associate II

Hello 

I am working on an STM32F765VGT6 microcontroller using STM32CubeIDE v1.17.0 on Windows 10 Pro. The project requires enabling both Ethernet (ETH) and USB Custom HID functionalities.  

Enabled Connectivity in STM32CubeIDE:

1. Ethernet (ETH) 

 Mode: RMII

2.USB Configuration

Custom Human Interface Device (HID) enabled 
USB_OTG_FS in Device Mode

Problem Faced:

  1. In Project Manager → Code Generator, there are two options: 
  2. For Ethernet: Requires selecting "Add necessary library files as reference in the toolchain project configuration file."
  3. For USB Custom HID: Requires selecting "Copy only necessary library files."
  4. However, both options cannot be selected simultaneously, forcing me to choose Add necessary library files as reference in the toolchain project configuration file. Please find the attachment for your reference.

    Issue with USB Middleware Files:
  • Due to the selected option, USB middleware files are not being generated properly
  • As a temporary solution, I manually add the missing USB middleware files.
  • However, every time the .ioc file is modified, all manually added files get deleted, so we have to add them again.

    Required Solution:

Could you please guide me on how to properly configure both Ethernet and USB Custom HID in STM32CubeIDE so that:

  • All required auto-generated files (including middleware) are generated correctly. Modifying the `.ioc` file does not cause loss of manually added files.
  • I would appreciate your support on this matter. Looking forward to your response.

Regards
Badrinathan J

3 REPLIES 3
Ghofrane GSOURI
ST Employee

Hello @Badrinathan 

I would like to thank you for posting.

You mentioned that USB middleware files are not being generated properly. Could you please explain more? What are the missing files that you had to add manually and did you face any compilation errors?

By following the steps mentioned above , I 'm sharing the generated project with you 

GhofraneGSOURI_0-1739349958980.png

I compared the generated files from my project to the generated files of the example CustomHID_Standalone for  STM32F769I-EVAL to see what files could be missing

GhofraneGSOURI_1-1739350112683.png

==> same generated files .

 

I will be waiting for your feedback.

THX

Ghofrane 

Hi @Ghofrane GSOURI 

Thank you for your Prompt response.

PFA, I have enclosed images showing the generated files for your reference.

  • In image-1 (CUSTOM_HID), only Custom HID is enabled, and all necessary files are generated correctly.
  • However, in image-2 (Base_HID), when trying to integrate both Ethernet and Custom HID, some required files are missing.

    We observed the following behavior:
  • If we select "Copy necessary files to the project", the Custom HID middleware files are generated correctly, but the Ethernet middleware files are missing.
  • If we select "Add necessary files to the project", the Ethernet middleware files are generated correctly, but the Custom HID middleware files are missing.

    Additionally, in the Base HID image:
  • Under the CUSTOM_HID folder, no files have been generated.
  • In the Core subfolder, no files have been generated either.
  • Only empty folders are created, and we are unable to open them.

    Could you please provide guidance on resolving this issue so that both Ethernet and Custom HID middleware files are generated correctly?

Looking forward to your support.

Best regards,
Badrinathan J

Hello @Badrinathan 

Try to use STM32CubeMX 6.13.0 standalone , it works correctly 

A child ticket has been raised to STM32CubeIDE team  in order to fix the issue (Internal ticket number  202905  )

THX

Ghofrane