cancel
Showing results for 
Search instead for 
Did you mean: 

Is `ux_user.h` included in the project when generated from CubeMX?

audio
Senior

Using Ux_Device_Audio2.0_PlayBack as an example for STM32H753, I enabled in the .ioc file, but it doesn't seem to be affected in the project. Any idea why? 

 

In the .ioc, I have this `UX_DEVICE_CLASS_AUDIO_FEEDBACK_SUPPORTenabled... should be affecting ux_user.h 

 

audio_0-1763158205482.png

 

But ux_user.h is not being used in the project, so I don't think it's actually being built into the .elf file. I also can't find the file in the STM32CubeIDE project as well, although it is under `USBX/App/ux_user.h` in the system explorer...

Here's the Project explorer in the IDE:

audio_1-1763158813613.png

and even opening each of those *.c files doesn't reveal ux_user.h

audio_2-1763158872615.png

Lastly, I do have UX_INCLUDE_USER_DEFINE_FILE in the preprocessor:

audio_3-1763158955819.png

Am I missing something?

11 REPLIES 11
Mohamed_AYED
Senior

Hi @audio,

  1.  by enabling the "UX_DEVICE_CLASS_AUDIO_FEEDBACK_SUPPORT" in cubemx this flag will be defined in ux_user.h
  2. UX_INCLUDE_USER_DEFINE_FILE is defined by default in preprocessor.
  3. when compiling your project ux_user.h will ben included. you can see here 
    https://github.com/eclipse-threadx/usbx/blob/68aee7d1053bad353f941a7e71b46585c7398270/ports/generic/inc/ux_port.h#L67

So when compiling the project, the Generic USBX Project constants in "ux_port.h" will be forced to constants defined to the user in "ux_user.h"

Thank you for your response, where would I find this in the STM32CubeIDE? I
shared the screenshots in previous post so without showing the headers
automatically, it's hard to find where they are. Even using search doesn't
show the file.
Mohamed_AYED
Senior

Can you share with me your ioc file ?

FBL
ST Employee

Hi @audio 

Totally agreed @Mohamed_AYED 

About USB_AUDIO_FEEDBACK_SUPPORT,  it is still not supported by our current implementation as I mentioned here

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.


@Mohamed_AYED Thank you for your response. Here's the .ioc file. 

@FBL Hello again! Just to clarify, if I enable UX_DEVICE_CLASS_AUDIO_FEEDBACK_SUPPORT or not, it won't work in this project? 

 

Edit: I should clarify, I enabled this in the .ioc file, I couldn't do this in the ux_user.h file as I can't find this as mentioned in the original post of this question. I expect that when I enable this, I should see ux_user.h show up in the Project Explorer for me to use UX_DEVICE_CLASS_AUDIO_FEEDBACK_SUPPORT.

audio
Senior

@Mohamed_AYED @FBL 

Following up, I haven't heard a reply from you since. 

FBL
ST Employee

Hi @audio 

Did you try with latest CubeMX version? 

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.


Mohamed_AYED
Senior

Hi @audio,

Sorry for the delay, i tried project generated with you .ioc and i see that UX_DEVICE_CLASS_AUDIO_FEEDBACK_SUPPORT is correctly generated in ux_user.h and correctly included in the project.

To test that you can compile generated code and then go to ux_device_class_audio_change.c file click with rigth button of your mouse on UX_DEVICE_CLASS_AUDIO_FEEDBACK_SUPPORT then go to declarection you can see that UX_DEVICE_CLASS_AUDIO_FEEDBACK_SUPPORT is defined in ux_user.h

Mohamed_AYED_0-1763678527373.png

 

FBL
ST Employee

Hi @audio @Mohamed_AYED 

I found this interesting example supporting feedback endpoint (full SW setup). Feel free to use it as reference.
Assigning feedback endpoint here, initialize feedback task then compute USB feedback.

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.