2014-02-14 02:07 PM
I was trying to read a file stored on a SD card with the fatfs library
but the f_open return always FR_NO_FILE. The file is present and it was loaded on the SD using a PC with Win7. I tried to figure out what is the problem and I found that inside the procedure dir_find, called from f_open, the mem_cmp between two strings return an error. the first string is the name of the file that I pass as a parameter in f_open the second string is the name of the file in the directory entry. Name of my file ''f1.pdf'' f_open string parameter = ''f1 pdf'' (insert 6 spaces between f1 and pdf (modified 8 +3) ) directory entry name = ''f1pdf ~ 1 pdf'' Obviously the two strings are the different, mem_cmp fails and the file is not found. How can I configure fatfs for read the filename format used by Win7 for storing files? Thanks #lfn #fat #fatfs-filename #long-file-name2014-02-14 06:37 PM
How have you set up _USE_LFN and _LFN_UNICODE ?
2014-02-15 05:29 AM
2014-02-16 12:45 AM
Uhm
....
Thanks guys for
the help
, but I'man idiot
I am a
Win
XP
user....
Win7
don't show me
the file extension
The correct name of the
file
withI was working
was ''
f1.pdf.pdf'' It's the first time I work with FATFS and I was thinking to a configuration problemNow works
...
I ma sorry for
the stupid
mistake
2014-02-16 06:33 AM
''Win7
don't show me
the file extension''
That's nothing to do with Win7; it's an Explorer configuration option - and exactly the same behaviour can be configured on XP (in fact, I think it's the default?)IIRC, this first appeared in Win98?2014-02-16 06:59 AM
At a command line try also DIR /x
2014-04-18 03:15 PM
Hi francescato.diego
have you ever tried to change the pdf file inside?or have you ever created a new pdf file? Is it posible? (create pdf file)Thanks a lot2014-04-20 11:41 PM
Hi asik
No I used a
large
pdf file
onlyfor testing
rd/wr on my
SD
+
FATFS
driver2014-04-23 02:40 AM
If you don't mind, Can you share your code? or how is it?
Thanks.