Skip to main content
zyimi
Associate
January 26, 2019
Question

�?stm32f4xx_hal.h�? needs “stm32f4xx_hal_def.h�?,but "�?tm32f4xx_hal_def.h “ has included “stm32f4xx_hal.h“.

  • January 26, 2019
  • 2 replies
  • 2774 views

0690X000006DFSHQA4.jpg

    This topic has been closed for replies.

    2 replies

    S.Ma
    Principal
    January 26, 2019

    There are some cross definitions, however, compiler will successfully work. Some of the #include within a header file are not placed at the top of the file.

    Most headers are recurse protected either by compiler preprocessor (we have past the jurassic period), or simply by the

    #ifndef _THIS_HEADER_FILE_

    #define _THIS_HEADER_FILE_

    #include "againthisone.h"

    #endif...

    zyimi
    zyimiAuthor
    Associate
    January 26, 2019

    the point is sequence。Under these conditions,compiler will ​compile stm32f4xx_hal.h first。but the defined structure:HAL_StatusTypeDef is in stm32f4xx_hal_def.h。like recurse 

    Tesla DeLorean
    Guru
    January 26, 2019

    You must call out the modules you want to include via defines in stm32f4xx_hal_conf.h in your project. Review the template projects.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..