Skip to main content
SWenn.1
Senior III
September 1, 2024
Solved

STM32CubeL4 seems to be missing stm32l4xx.h file?

  • September 1, 2024
  • 1 reply
  • 1899 views

Hello ...

I cloned the github repo:

https://github.com/STMicroelectronics/STM32CubeL4/tree/master 

I am trying to compile the PWR_STOP1_RTC project but keep getting a fatal error 

 

../../../../../../../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_def.h:29:10: fatal error: stm32l4xx.h: No such file or directory

 

where can I find this file to include within the ....Drivers/STM32L4xx_HAL_Driver/Inc?

Thanks  

Best answer by STTwo-32

For a succesful clone of this repository. The only way is to use the command 

git clone --recursive https://github.com/STMicroelectronics/STM32CubeL4.git

And dont forget the recursive. 

Best Regards.

STTwo-32 

1 reply

STTwo-32
ST Technical Moderator
September 1, 2024

Hello @SWenn.1 

This file does exist : https://github.com/STMicroelectronics/cmsis_device_l4/tree/a2530753e86dd326a75467d28feb92e2ba7d0df2/Include.

For the clone operation, have you used this command:

git clone --recursive https://github.com/STMicroelectronics/STM32CubeL4.git

If you didn't added the --recursive or you have downloaded directly the repository as. Zip, that will  create a compilation problem. 

Best Regards.

STTwo-32 

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.
SWenn.1
SWenn.1Author
Senior III
September 1, 2024

I cloned everything but for some reason under the Driver section BSP / STM32L4xx_Nucleo and CMSIS/Device/ST did not come down when I cloned....I had to go up and look into these spaces on github, go to my local area, clone them each separately and then set up the linked files space....

All in all it wasn't very clean as one would hope but I do have things working at this end.

Thanks

STTwo-32
STTwo-32Best answer
ST Technical Moderator
September 1, 2024

For a succesful clone of this repository. The only way is to use the command 

git clone --recursive https://github.com/STMicroelectronics/STM32CubeL4.git

And dont forget the recursive. 

Best Regards.

STTwo-32 

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.