2025-02-20 06:38 AM
Hi Team,
"I'm working on a TouchGFX project that was generated using the TouchGFX Designer. I need to add source files for USB functionality. I tried adding the .c and .h files to the Core/Src and Core/Inc directories, but I'm getting an error stating that the files cannot be found. How can I properly add .c and .h files to a TouchGFX project?
Also, I am highlighting the place where I want my source file in a screenshot."
I have a folder named TCOMP that contains .c and .h files. I also tried adding this folder to my project by updating Paths and Symbols under Properties > C/C++ General, but I'm still encountering the same error. How can I correctly include these files in my project?
Thanking you in advance
Solved! Go to Solution.
2025-02-20 07:01 AM
hello,
to add file source file .c in STM32CubeIDE you can add it manually :
- right click on USB_HOST
- select New > File
- select "<<Advanced" and check "link to file in the file system"
- after that you can Browse your file source that you want
Best regards.
Elhem.
2025-02-20 07:01 AM
hello,
to add file source file .c in STM32CubeIDE you can add it manually :
- right click on USB_HOST
- select New > File
- select "<<Advanced" and check "link to file in the file system"
- after that you can Browse your file source that you want
Best regards.
Elhem.
2025-02-20 09:24 PM
hello, thank you for the response. i have followed the step as you mentioned, now iam not getting error where file not found. but small issue again here.
after added that source file i been calling a function from that source to in "USBH_UserProcess", when iam doing this USB is not detecting. debugger not even crossing the break pointer, but if i removed that calling function then everything is working as expected. can you tell me whats happing here.
I Have added some screen short for your reference.
also i have observed one thing,
you can see those two highlighted places in my code in which case called "HOST_USER_CONNECTION",
working fine when i call the same function dummyfile() in this case, but if i call the dummyfile() function in any another case the interrupt is not triggering. can you tell me anything i been missing here.
thanking you
Regards,
Naveen Palle.