Skip to main content
Greg Smith
Associate II
December 12, 2017
Question

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

  • December 12, 2017
  • 1 reply
  • 1221 views
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.

    This topic has been closed for replies.

    1 reply

    Greg Smith
    Associate II
    December 12, 2017
    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?

    Technical Moderator
    December 12, 2017
    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

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    Greg Smith
    Associate II
    December 13, 2017
    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.