Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow FF_FS_NOFSINFO to be configured via menuconfig (IDFGH-14467) #15241

Open
try-except opened this issue Jan 20, 2025 · 3 comments
Open

Allow FF_FS_NOFSINFO to be configured via menuconfig (IDFGH-14467) #15241

try-except opened this issue Jan 20, 2025 · 3 comments
Assignees
Labels
Status: Reviewing Issue is being reviewed Type: Feature Request Feature request for IDF

Comments

@try-except
Copy link

Is your feature request related to a problem?

When using the f_getfree function from the FatFs library, sometimes the wrong value for the amount of available clusters is returned. FatFs offers the option to request a full scan of the FAT when calling f_getfree for the first time via the FF_FS_NOFSINFO macro defined in ffconf.h, but currently in ESP-IDF this is a hardcoded value and can't be set per-project. This is a little bit annoying when working in a team for example because everyone has to manually change the value in their ESP-IDF installation.

Describe the solution you'd like.

Just as FF_FS_LOCK or FF_FS_TIMEOUT, it would be very nice to have the option to set the value for FF_FS_NOFSINFO in menuconfig.

Describe alternatives you've considered.

Changing the vale manually whenever I catch the f_getfree function returning bogus values.

Additional context.

No response

@try-except try-except added the Type: Feature Request Feature request for IDF label Jan 20, 2025
@github-actions github-actions bot changed the title Allow FF_FS_NOFSINFO to be configured via menuconfig Allow FF_FS_NOFSINFO to be configured via menuconfig (IDFGH-14467) Jan 20, 2025
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 20, 2025
@adokitkat
Copy link
Collaborator

Good point, thank you.

@espressif-bot espressif-bot assigned adokitkat and unassigned pacucha42 Jan 23, 2025
@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed and removed Status: Opened Issue is new labels Jan 23, 2025
@adokitkat
Copy link
Collaborator

Do you have any recommendations to which level do you use and which could be the default? We have encountered problems with free space reporting before so maybe it would make sense to change the default to make it more usable.

@try-except
Copy link
Author

I think setting it to 0 as the default is ok since that's what FatFs uses as the default, so I personally would try to mimic FatFs and their documentation. Whenever I want a full scan I just set it to 3, that way FatFs doesn't "trust" any previous values. I haven't really tried the other options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Reviewing Issue is being reviewed Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

4 participants