2025-06-10 9:21 AM
Hi! I read from many posts that it's possible to use FAFTS with this board, but I can't get the project to compile without errors. The weird thing is that errors appear between the files of the libraries themselves (attached photo). Variables that are defined show up as undefined. Moreover, in the main I have also defined this type of variables and it accepts them well. Any idea what might be going on?
Thanks
2025-06-10 9:52 AM
@ire wrote:Variables that are defined show up as undefined.
Those messages are not complaining about variable names: they are saying that the type names FATFS and FIL are not defined.
Probably, you're missing a header file - the one which defines those types.
Please give more detail on how you created this project.
@ire wrote:this board
What board? You've mentioned a chip, but haven't said what board it's on.
How to write your question to maximize your chances to find a solution
2025-06-10 11:15 PM
I'm using the NUCLEO U575ZI-Q. I created the project with STM32CubeMX, adding FreeRTOS and starting SDMMC1. As FatFs can't be implemented directly, I started it in a project for STM32L4R9ZGTx and then I put the all the files for FatFs in my project.
2025-06-11 1:04 AM
@ire wrote:FatFs can't be implemented directly.
Not sure what you mean by that?
@ire wrote:I started it in a project for STM32L4R9ZGTx and then I put the all the files for FatFs in my project.
Again, it sound like you missed one.
If you do a text search through all those files, is there anywhere that defines the the type names FATFS and FIL ?
2025-06-11 1:38 AM
I mean that I can't put it in my project by STM32Cube (it's not a middleware included for this board).
Yes, FIL and FATFS are defined in 'ff.h'. It's as though the project wasn´t opening this file from some of the files.
2025-06-11 1:42 AM
You haven't shown the full build output - were there other messages saying that the file was not found?
If you use your IDE's "go to definition" feature, does that find them?
Are they disabled by some #if or #ifdef ?
2025-06-11 1:58 AM
It's always the same message repeated.
Yes, if I use 'go to definition', IDE opens "ff.h", where is the structure defined.
No, I can't find no #if or #ifdef for this issue.