cancel
Showing results for 
Search instead for 
Did you mean: 

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

zyimi
Associate

0690X000006DFSHQA4.jpg

3 REPLIES 3
S.Ma
Principal

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...

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 

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 Venmo
Up vote any posts that you find helpful, it shows what's working..