Question
Read SD card with fatfs and win7 files names
Posted on February 14, 2014 at 23:07
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-name