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

l_seek does not work because f_size always returns 0 #13

Open
JustEnoughDucks opened this issue Jan 13, 2023 · 2 comments
Open

l_seek does not work because f_size always returns 0 #13

JustEnoughDucks opened this issue Jan 13, 2023 · 2 comments

Comments

@JustEnoughDucks
Copy link

Hello,

I have been trying to get functionality of using l_seek with F_size to get the end of a line since this version (and the HAL version for F0 chips in general) only supports up to R0.11 of FatFS which doesn't include the FA_APPEND flag.

No matter how much I write to the SD card, even when the files are verified off-system, f_size() function and indeed the fsize member of the file handler is always 0. This makes writing to the end of a file after file close extremely difficult. All other reading and writing functions work correctly. Indeed if I never close the file, I can write many lines without a problem, but for the use-case of having a removable and re-insertable SD card it is a huge problem.

Is this a reproducible error on your side?

@kiwih
Copy link
Owner

kiwih commented Jan 13, 2023

Not an issue I have ever faced (I don't tend to use the F0 chips). Can you import your own version of FatFS instead of using the HAL-provided version?

@JustEnoughDucks
Copy link
Author

I did try that to move to R0.12c instead of R0.11, but CubeIDE kept on giving me errors that the ff_genb_drv file didn't have any standard types available in the stdlib.h and integer.h that it has an include for. It seems to be optimizing out the essential files, but if I turn optimization off, then the program blows up and I run out of flash because of bloated HAL I2C and SPI libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants