Home > other >  Fatfs + + stm32 sd card, the file name
Fatfs + + stm32 sd card, the file name

Time:02-05

In fatfs standard interface to create documents, why would come out to the puzzling file,
LOG_OV ~ 1. "
$
QCRESU ~ 1.SAMPLA ~ 1.
The $
These files are not created by yourself, don't know how to produce (as shown in figure 1),


Figure 1




2. The picture of the read-only file file from PC directly copy to SD card, only in the program read the file operations, file name don't know how to be changed (as shown in figure 2),

Figure 2

CodePudding user response:

1. Like does not support long file names, use short file name in English to try,
2. Like Chinese file name code wrong, Chinese should use the Unicode character set,

CodePudding user response:

Figure 1, the program should create log_overview, but appeared log_overview, and LOG_OV ~ 1. "and I know it is a long file names, one is the short name of the file, but why the same set of code will produce the two files,
Figure 2 files are all English name, there is no Chinese name

Moreover, figure 1 and figure 2 of this kind of phenomenon is not must first, rarely appears

CodePudding user response:

With the version of the file system? Configuration to look at, such as support long file names and length, use of coding, etc., if there is no problem with the latest version of the file system, do not manage it

CodePudding user response:

/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --/
/FatFs - FAT file system module configuration file R0.12 ChaN, (C) 2016
/-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */

88100/* */Revision ID # define _FFCONF

/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --/
/Function Configurations
/-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */

# define _FS_READONLY 0
/* This option switches the read - only the configuration. (0: the read/Write or 1: read - only)
/Read - only the configuration removes their API functions provides, f_write (), f_sync (),
/f_unlink (), f_mkdir (), f_chmod (), f_rename (), f_truncate (), f_getfree ()
/and optional writing functions provides the as well. */


# define _FS_MINIMIZE 0
/* This option defines minimization level to remove some basic API functions provides.

/0: All basic functions provides are enabled.
/1: f_stat (), f_getfree (), f_unlink (), f_mkdir (), f_truncate () and f_rename ()
/are removed.
/2: f_opendir (), f_readdir () and f_closedir () are removed in addition to 1.
/3: f_lseek () function is removed in addition to 2. */


# define _USE_STRFUNC 1
/* This option switches string functions provides, f_gets (), f_putc (), f_puts () and
/f_printf ().

/0: Disable string functions provides.
/1: Enable without LF - CRLF conversion.
/2: Enable with LF - CRLF conversion. */


# define _USE_FIND 0
/* This option switches filtered directory read functions provides, f_findfirst () and
/f_findnext (). (0: Disable, 1:2: Enable Enable with matching altname [] too) */


# define _USE_MKFS 1
/* This option switches f_mkfs () function. (0:1: Disable or Enable) */


# define _USE_FASTSEEK 1
/* This option switches fast seek function. (0:1: Disable or Enable) */


# define _USE_EXPAND 0
/* This option switches f_expand function. (0:1: Disable or Enable) */


# define _USE_CHMOD 0
/* This option switches attribute manipulation functions provides the f_chmod () and f_utime ().
/(0:1: Disable or Enable) braking _FS_READONLY needs to be 0 to Enable this option. */


# define _USE_LABEL 1
/* This option switches volume label functions provides, f_getlabel () and f_setlabel ().
/(0:1: Disable or Enable) */


# define _USE_FORWARD 0
/* This option switches f_forward () function. (0:1: Disable or Enable)
/To enable it, braking _FS_TINY need To be 1. */


/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --/
/Locale and Namespace Configurations
/-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */

936//# define _CODE_PAGE in Chinese GBK code
/* This option specifies the OEM code page to be 2 on the target system.
/Incorrect setting of the code page can cause a file open failure.

/1 - ASCII (No extended character. The Non - LFN CFG. Only)
/437 - U.S.
/720 - Arabic
/737 - Greek
/771 - KBL
/775 - Baltic
/850 - Latin 1
/852 - Latin 2
/855 - Cyrillic
/857 - Turkish
/860 - Portuguese
/861 - Icelandic
/862 - Hebrew
/863 - Canadian French
/864 - Arabic
/865 - Nordic
/866 - the Russian
/869 - Greek 2
/932 - Japanese (DBCS)
/936 - Simplified Chinese (DBCS)
/949 - Korean (DBCS)
/950 - Traditional Chinese (DBCS)
*/


# define _USE_LFN 3
# define _MAX_LFN 255
/* The _USE_LFN switches The support of long file name (LFN).

./0: Disable the support of LFN _MAX_LFN has no effect.
/1: Enable LFN with static working buffer on the BSS. Always NOT thread - safe.
/2: Enable LFN with dynamic working buffer on the STACK.
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related