2022-10-31 01:57 PM
I was given a code to add USB support to the firmware. I am using Stm32CubeMX to generated the boiler plate for the USB. I enabled the USB peripheral and reconfigure the clock setting and regenerate the code. When I try building the fresh project after code generation, it is throwing multiple definition error. I need help how to set the option to regenerate the code without the multiple definition. I thought of adding the USB peripheral manually but I believe the clock configuration will prove challenging for me now. Also the project was done with an older version of CubeMX and I used the migration option offered by CubeMX to migrate the project to the current version of CubeMX
Thanks
Solved! Go to Solution.
2022-10-31 03:39 PM
Delete subdirectory Source/Templates with all its contents and refresh the project.
Templates should never be copied literally into user project.
Also note that main() is missing - not clear why. Is there main.c ?
2022-10-31 03:39 PM
Delete subdirectory Source/Templates with all its contents and refresh the project.
Templates should never be copied literally into user project.
Also note that main() is missing - not clear why. Is there main.c ?
2022-11-02 10:41 AM
Yes there is main.c. The issue was the template folder.
Thanks again