2022-03-07 11:59 AM
Hi,
I'm looking for the right steps to add the Hal library to a Keil project.
i already have the stm32f1xx hal library that include the hal and the cmsis folders (src and include).
i'm facing some problem with linking the library. so if someone can tell me the steps i need to follow to build the project.
Solved! Go to Solution.
2022-03-07 02:25 PM
You should be able to open, or clone, the project examples under the CubeF1 trees, it might want to pull the STM32F1 pack
Look at construction and meta-data settings of an example
\STM32Cube_FW_F1_V1.8.4\Projects\STM32F103RB-Nucleo\Examples\CRC\CRC_Example\MDK-ARM\Project.uvprojx
To add to something else?
You'd need to set up Include Paths, based on YOUR relativity to them
../Inc;../../../../../../Drivers/CMSIS/Device/ST/STM32F1xx/Include;../../../../../../Drivers/STM32F1xx_HAL_Driver/Inc;../../../../../../Drivers/BSP/STM32F1xx_Nucleo
Add some command line defines for Library and CPU (USE_HAL_DRIVER,STM32F103xB,USE_STM32F1xx_NUCLEO)
Pull in the Library source files to a sub-group in your project
Create a stm32f1xx_hal_conf.h to pull in/enable sub components
STM32Cube_FW_F1_V1.8.4\Projects\STM32F103RB-Nucleo\Examples\CRC\CRC_Example\Inc\stm32f1xx_hal_conf.h
2022-03-07 02:25 PM
You should be able to open, or clone, the project examples under the CubeF1 trees, it might want to pull the STM32F1 pack
Look at construction and meta-data settings of an example
\STM32Cube_FW_F1_V1.8.4\Projects\STM32F103RB-Nucleo\Examples\CRC\CRC_Example\MDK-ARM\Project.uvprojx
To add to something else?
You'd need to set up Include Paths, based on YOUR relativity to them
../Inc;../../../../../../Drivers/CMSIS/Device/ST/STM32F1xx/Include;../../../../../../Drivers/STM32F1xx_HAL_Driver/Inc;../../../../../../Drivers/BSP/STM32F1xx_Nucleo
Add some command line defines for Library and CPU (USE_HAL_DRIVER,STM32F103xB,USE_STM32F1xx_NUCLEO)
Pull in the Library source files to a sub-group in your project
Create a stm32f1xx_hal_conf.h to pull in/enable sub components
STM32Cube_FW_F1_V1.8.4\Projects\STM32F103RB-Nucleo\Examples\CRC\CRC_Example\Inc\stm32f1xx_hal_conf.h