Hi All,
I am writing a application for Tiva C series MCU where I need to write/read the file to/from SD card.
If I read the directory by using FATFS library by calling fread as below iFResult = f_readdir(&directory, &File_Info);
here all the file information will be stored in File_Info structure. If I see the file name member in structure it is having as "FLOWER~1.JPG" instead of "flowers_Original.jpg".
Does anyone know why it is overwriting the file name and also I need to access the file by using "FLOWER~1.JPG" name only.
Any help is appreciated.
Thanks srini
Keil claims that they support long file names.
Have you checked if a configuration option needs to be enabled to add this support?
Because long file names is part of an extention to the original FAT file system.
Don't you need:
#if _USE_LFN static char lfn[_MAX_LFN + 1]; /* Buffer to store the LFN */ fno.lfname = lfn; fno.lfsize = sizeof lfn; #endif
hi Per Westermark,
Thanks for the earliest reply.
I Enabled the feature i defined _USE_LFN to 1 and also added the unicode.c to my project but I am getting the following error.
Trial_Link_CSU.axf: error: L6047U: The size of this image (46140 bytes) exceeds the maximum allowed for this version of the linker
thanks, srini
But he's not using Keil's filesystem - he's using FatFs
elm-chan.org/.../00index_e.html
"Have you checked if a configuration option needs to be enabled to add this support?"
Yes, it is - Long File Name (LFN) support is discussed here:
elm-chan.org/.../appnote.html
So you're either going to have to get a Keil version which does allow larger images, or get a different toolchain which does allow larger images - aren't you?
www.keil.com/.../limits.asp
Exactly. My first response assumed it was Keil's file system layer. But since I failed to get a manual hit on that function on Keil's site I realized what library he used. So my second post specified the changes required with that library.