cancel
Showing results for 
Search instead for 
Did you mean: 

How to use common drivers in a stm32cube ioc project without copying files into project?

VShar.1
Associate

Hey,

I've a project based on Nucleo-32 STM32F042K6 board. I'm moving this project to my team's common repo which already has the stm32cube drivers in another folder. How can I update my project to use the drivers already existing on the repo instead of the ones that were copied into the project?

As in screenshot, when i created this project, stm32cube copied over the drivers folder with STM32F0 drivers. I want to use the same but from a folder outside this project.

I tried updating include paths within C/C++ Build>Settings but I get compiler errors that those .h files can't be found.

Thanks,

Vandita

0693W00000UnLA5QAN.png

1 REPLY 1
RomainR.
ST Employee

Hello @VShar.1 (Community Member)

You could exclude the entire Drivers directory that is local to your initial project.

Right click then Resource Configurations and Exclude from Build.

Then drag and drop from Windows explorer the Drivers folder common to your team into the CubeIDE project by choosing the linked resources option.

Then update the path by right clicking on the new directory appearing in your project and click on Add/Remove Include path...

Best regards,

Romain,

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.