cancel
Showing results for 
Search instead for 
Did you mean: 

How to include/find the source and header files for LL-Drivers?

WKhan.2
Associate II

Hi there, I have been using STM32G474, but if I look into the HAL driver folder structure I cannot find the files for LL-Drivers. I want to use LL functions in my code.

Looking forward to your quick suggestions.

BRs,

Waled0693W00000NqdoLQAR.png0693W00000NqdoVQAR.png2G474RE, the documentation says that it supports

1 ACCEPTED SOLUTION

Accepted Solutions

It is not necessary to download files from GitHub: the HAL and LL library files are already in your computer, if you are using CubeIDE or CubeMX. Look at the path that I wrote you in the previous post.

The DRIVERS folder is automatically updated and overwritten by CubeMX, so you don't have to put anything in that folder. You should create a new folder in which to put the LL library sources: maybe call it "LL_libs". Then you will need to include that folder in the build of your project.

View solution in original post

6 REPLIES 6
Andrea Canepa
Senior

In the internal structure of your project you cannot find the LL libraries because you have generated the project with CubeMX by setting to use the HAL libraries.

You have to manually include the LL libraries which you can find in the STM32Cube repository on your computer.

It is in the following path:

C:\Users\<<YourUserName>>\STM32Cube\Repository\STM32Cube_FW_G4_V1.5.0\Drivers\STM32G4xx_HAL_Driver\Src

WKhan.2
Associate II

@Andrea Canepa​  Thanks for the suggestion. Based on it, actually, I downloaded the official repository of STM from GitHub, and in that, I found the libraries for LL. The only issue which I have been facing is that when I add these files to my project's folder named "Driver". The moment I build my project after implementing changes in my code, all the added files vanish and I only see the standard HAL files which were already there from the beginning. What would you suggest?

https://github.com/STMicroelectronics/STM32CubeG4/blob/master/Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_ll_hrtim.h

It is not necessary to download files from GitHub: the HAL and LL library files are already in your computer, if you are using CubeIDE or CubeMX. Look at the path that I wrote you in the previous post.

The DRIVERS folder is automatically updated and overwritten by CubeMX, so you don't have to put anything in that folder. You should create a new folder in which to put the LL library sources: maybe call it "LL_libs". Then you will need to include that folder in the build of your project.

WKhan.2
Associate II

@Andrea Canepa​ I tried to follow your path but the thing is inside of "stmcube" folder, I could only see these files with the strange extensions

0693W00000NqeqcQAB.png

I don't know why you don't have the libraries in the standard location, but you can use the files you downloaded from GitHub. You just have to place them in a different folder to prevent them from being deleted during the code generation by CubeMX.

WKhan.2
Associate II

@Andrea Canepa​ Thanks for helping me out and being patient. I followed your instructions and created a new folder and included the path of Src and Inc of LL-drivers in my project. In short, it worked and now I can access these functions. Thank you so much for helping me out.