cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 CUBE MX FATFS HEADER FILE INCLUDE ISSUE

MXian.1
Associate

Hi All,

I am currently building a project with USER-DEFINED FATFS (since my SD card mount on SPI instead of SDIO).

I notice two weird include statement, FFCONG.h LINE 25 and 26,

"

#include "main.h"

#include "stm32f4xx_hal.h"

"

which are unnecessary because there are only few #define statement in the file. And what worse if we use main.h in ffcong.h, we cannot declare any function in main.h file with any FATFS variable or function. If we do so, the compiler will show "UNDEFINE FIL...".

I just wonder the purpose of those two statement? Is there any benefit to include main.h in ffcong.h? Thank you.​

3 REPLIES 3
FBL
ST Employee

Hello @MXian.1​,

I can see that these statements include in header, main files of HAL driver and BSP driver. You can never use them. However, could you please describe your issue, some symptoms to help you.

You can also suggest ideas as improvements to ST products. Please read this article.

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.

The Idea Zone was not meant for bug reports or minor issues. And it is effectively dead:

https://community.st.com/s/question/0D53W00001gvm6kSAA/the-ideas-section-pointless-dead-end

Anything that is open for everyone and the content is not moderated, will always be destroyed by idiots spamming it over with a junk. Idea Zone is a perfect example of that.

Thank you @Piranha​ ​, for your constructive feedback. I have already reported the spams.

However, to investigate the issue further @MXian.1​, details of your working environment and the FATFs CubeMX configuration would be appreciated.

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.