2024-02-27 01:45 AM
Hi!
i am working with STM32U575RIT6,
i want to read and write data through USB_OTG_FS (without threadx).
i have externally added the middleware and usb device files (not generated files) to my project.
i am facing a linker error,
all the file paths and the functions declarations are all fine, no errors observed.
whenever i am trying to write code in main.c, i am facing the linker error.
i have attached the images of it, check them and let me know what i need to change.
2024-02-27 03:45 AM
Hi,
maybe this example helping you :
https://github.com/tdjastrzebski/Nucleo-U5A5ZJ-USBX
or this, with classic core :
https://github.com/STMicroelectronics/stm32h5-classic-coremw-apps
2024-02-27 04:24 AM
Hi @ramyasree,
If you are using ST-USB stack CDC ACM class you can refer to this application delivred by ST
I recommande you to :
2024-02-28 01:00 AM
thanks for the reply,
i have gone through the link and added the CDC standalone file system, but the problem is that, during the code generation, the middleware and usb files are not getting generated. check the attached images.
the usb and middleware files are not generated,
whenever i try to add them externally i am getting the linker error.
so how can i solve this?
am i doing anything wrong in the configuration?
y are the files not generated?
2024-02-28 01:43 AM
Hello @ramyasree
Unfortunately, when using CubeMX for classic USB MW applications, you should define paths for MW and backup them before regenerating. To do so, you need to include libraries and add paths as explained @Mohamed_AYED
I hope this helps!
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.
2024-02-28 10:16 PM
this is my first time working with external libraries, so can you please share some article which helps me to understand how to add the file paths properly in stmcubeide.
till now i am adding the path by a rightclick on the include folder and click the option "add/remove path".
this is how i have added the files earlier.
i haven't used the properties path as @Mohamed_AYED mentioned.
i have added the images for better understanding, please check and let me know your comments.
all of your responses are much appreciated, as i am new to USB and STM MCU.
i am looking forward to learn more on STM and USB with all of your guidance.
this is how i have confirmed the paths are added.