cancel
Showing results for 
Search instead for 
Did you mean: 

Including HAL and LL drivers as a reference

CTabo.1
Senior

Hello,

I need to create two projects, under a common root, that shares user files and HAL drivers.

The project tree look like this:

\Inc
\Src
\Startup
\Drivers
\Project1
\Project2

So I started to create an empty STM32 project.
Then I have added the necessary preprocessor symbols and include path to include HAL drivers in my project.

CTabo1_0-1694012946755.pngCTabo1_1-1694012993667.png

As I want to include the HAL drivers files as a reference, I linked the Driver folder to my project using the feature "Link to files and recreate folder structures with virtual folders".

However, when building I have undefined reference errors to HAL functions.
It is not an include path problems, but it seems like the HAL source files aren't added to the project.

Where is my mistake?

Thank you,

Carlo

2 REPLIES 2
Rim LANDOLSI
ST Employee

Hello @CTabo.1 and welcome to the community,

Could you, please, provide the full log of what fails to further analyze this issue .

Thanks,

Rim

 

 

Hello Rim,

at least I found a solution creating the folder structure using File->New->Source/Source folder menù options, and then adding the files, using the "Link to files" option.

CTabo1_4-1694419765416.png

So this issue is no more blocking for me.

Anyway, if I try to add the entire /Drivers folder using the “Link to files and recreate folder structure with virtual folders” option, I have the following mistakes.

CTabo1_5-1694419795570.pngCTabo1_6-1694419805840.png

I also tried to use the “Link to files and folders” instead of “Link to files and recreate folder structure with virtual folders”, but even in this case I wasn’t able to compile.

Thank you,

Carlo