cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-USB-AUDIO Expansion Package won't compile

etheory
Senior

Dear STM32CubeIDE community.

I've been trying to write a USB audio input driver (I want to use the Nucleo F746ZG to generate audio data, that gets sent back to the computer to play as "input audio") and thought that the X-CUBE-USB-AUDIO Expansion Package - https://www.st.com/en/embedded-software/x-cube-usb-audio.html - would be ideal.

Unfortunately, not only does it not compile, there is no useful documentation about how to use it at all.

The issue is in:

/Class/CustomHID/Src/usdb_customhid_if_template.c

which is missing the TEMPLATE_CUSTOM_HID_ReportDesc definition and implementation, even though it is used by:

USBD_CUSTOM_HID_ItfTypeDef USBD_CustomHID_template_fops

This means that out-of-the-box neither the examples, nor the library itself even compiles.

Even though this is trivial to fix, if I add the obvious definition you would expect, I then get a bunch of other errors that don't seem quite as trivial to fix, but this isn't a good start for a vendor-supplied library.

Has anyone managed to get any part of this working?

Does anyone have any tips about where to find proper documentation for this? Or should I just do what I always do with the HAL and just mindlessly hack it for weeks until it gives me something that almost-but-not-really works properly?

ST, do you provide working USB audio in/out drivers for the Nucleo F7 range that actually work and are documented sufficiently to use? I'm not really that keen on having to write one from scratch, but it's looking like I will have to.

Thanks.

6 REPLIES 6
Ons KOOLI
Senior III

Hi etheory,

Thank you for your feedback.

We will fix this as soon as possible.

Best Regards,

Ons.

Ons KOOLI
Senior III

Hi etheory,

After forwarding the issue internally, since I've got the projects not compiling after downloading the package locally. However, USB dev team did not find any issues. We figured out that maybe the issue was because you placed the FW directory in a too long path. Could you please try to put the FW in a shorter path? For example directly under C:/ ? Please try this solution and provide me with the results you found.

Best Regards,

Ons.

Ons KOOLI
Senior III

Hi etheory,

Any updates ?

Best Regards,

Ons.

Hi Ons,

I am on vacation for the next week so won't have access to a computer until then, but your USB dev team is wrong, there are no issues with path lengths, the issue is clearly with the code as I clearly described in my first post. If the code doesn't contain a definition that it tries to use, it won't compile. Could you please have them look at that first?​ There are no path length issues with Eclipse on Windows 10, I've used long paths since starting STM32 dev without any issues whatsoever.

The issue is, quite simply, that the provided library does not compile due to an error in the code. If the USB team would instead like to give me a detailed step by step example of how to compile that code, instead, I'd love to give that a go. Maybe there is some obvious step I'm missing.​

Regards,

Luke​

Hi etheory,

The usdb_customhid_if_template.c file has no relationship with the projects. it comes with the FW because CustomHID is a class provided by ST Middleware. You can even remove it, it will has no impact on the project functionality.

The development team tested the two projects present on the FW, and they perfectly work, both of them.

You can provide more details about your issue, for example: your log file, screenshots of the errors, ..

If the code doesn't contain a definition that it tries to use, it won't compile: Can you please precise which part of the code that tries to use a missing definition ?

>  If the code doesn't contain a definition that it tries to use, it won't compile: But I compiled the two projects and there is no issue, dev team run them, and there is also no issue.

> If the USB team would instead like to give me a detailed step by step example of how to compile that code: In fact, you can refer to the readme.txt file. The project could be compiled as any other ST project. You just have to open your preferred toolchain and configuration, then run the project.

Best Regards,

Ons.

Ons KOOLI
Senior III

Hi etheory,

Please inform us if you have any updates on this question. Or you can mark it as answered by checking Select as Best if your problem is well solved.

Best Regards,

Ons.