2020-08-12 12:53 AM
Hi, I am using all HAL drivers in my project, and have this configured in STM32CubeIDE(in STM32CubeMX part of STM32CubeIDE). I want to use mixed HAL and LL drivers for DMA and UART. But, because in STM32CubeIDE device configuation(advanced options) I have selected HAL for DMA and UART, it only adds HAL drivers to the "../Drivers/STM32F0xx_HAL_Driver" folder of my project. I know I can copy the LL drivers from STM32CubeF0, but than I have to select what version. And, if I ever update the version of STM32CubeF0 via the IDE, it will not match the version of the files I copied. I want to IDE to copy both the HAL and LL files into the "../Drivers/STM32F0xx_HAL_Driver" folder.
2020-08-12 02:00 AM
You can easily combine HAL with CMSIS register-level coding. I wouldn't mix HAL (some wouldn't even use HAL at all) and another hardware abstraction (LL).
2020-08-12 02:29 AM
Hi, but is there a way to get STM32CubeIDE to add the HAL and LL drivers to my project? If I configure STM32CubeIDE for HAL mode, it does not add the LL drivers to "../Drivers/STM32F0xx_HAL_Driver" folder of my project.
2020-08-12 02:49 AM
There is only a trick i know of: you configure 2 UARTS, one HAL and the other LL and some DMA for either UART. This will copy HAL and LL drivers. In the Project Manager > Advanced Settings you can check "Do Not Generate Function Call" for the dummy UART which keeps the overhead low.
2020-08-12 06:10 AM
CubeMX is configured to only add what it needs. If you want to do something else, such as adding all files, you'll need to do it manually.
2020-08-12 10:16 AM
> And, if I ever update the version of STM32CubeF0 via the IDE, it will not match the version of the files I copied.
Eclipse has a useful feature for this, called Path Variables.
Instead of copying the drivers to your project, you can specify linking to the Cube repository (where the Cube installs the libraries and other its stuff).
Create one or more path variables to point to the library.
For example, name: STM32Cube_FW_F0 Location: C:\Users\Public\STM32Cube\Repository\STM32Cube_FW_F0_V1.11.0
Manually edit all these links in .project and .cproject and replace absolute paths to ST driver files, using these path variables.
Then to change the library version, you have only to change the path variable.
Unfortunately CubeMx does not understand path variables :(
-- pa