cancel
Showing results for 
Search instead for 
Did you mean: 

system_stm32h7xx.c generated by cube is missing include of stm32h7xx_hal.h

Greg Smith
Associate II
Posted on December 12, 2017 at 12:01

This is tedious as each time I adjust my project using the cube I have to edit the generated source file in:

Drivers/CMSIS/Device/ST/STM32H7xx/Source/Templates/system_stm32h7xx.c

In case this has anything to do with this, I used the GPDSC export from Cube and imported into CrossStudio.

3 REPLIES 3
Greg Smith
Associate II
Posted on December 12, 2017 at 12:03

The question part was meant to be: How do I report this so if it is a bug, it gets fixed?

Posted on December 12, 2017 at 14:10

 ,

 ,

Hello ,

You are in the right space: You can post your issue in this STM32 forum. Then, ST moderators will take in charge your request to answer you or raise your feedback/issues internally to the appropriate team.

About your reported issue, the include of 'stm32h7xx_hal.h' is ensured by USE_HAL_DRIVER which should defined in the toolchain compiler Preprocessor.

♯ if defined (USE_HAL_DRIVER)

♯ include 'stm32h7xx_hal.h'

♯ endif /* USE_HAL_DRIVER */

Best Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on December 13, 2017 at 01:16

Thanks for the response.

I think you are saying that USE_HAL_DRIVER is not defined by default and I need to set this in whatever compiler toolchain I am using. This seems a little odd as the include is required by the code that follows. However, it may be that I have this problem because I am using the

GPDSC export from Cube.