cancel
Showing results for 
Search instead for 
Did you mean: 

FATFS for STM32u575

ire
Associate II

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

ire_0-1749572442680.png

 

6 REPLIES 6
Andrew Neil
Super User

@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

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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.


@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 ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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.

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 ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

ire_0-1749631691586.png

ire_1-1749632312406.png

 

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.