I’m trying to create files and directories with Japanese names on a USB memory stick using FeeRTOS+FAT, but the characters are garbled. What could be the cause?
Input is in UTF8, and the settings are as follows:
#define ffconfigBYTE_ORDER (pdFREERTOS_LITTLE_ENDIAN)
#ifndef ffconfigHAS_CWD
#define ffconfigHAS_CWD (0)
#endif
#ifndef ffconfigCWD_THREAD_LOCAL_INDEX
#define ffconfigCWD_THREAD_LOCAL_INDEX (0)
#endif
#ifndef ffconfigLFN_SUPPORT
#define ffconfigLFN_SUPPORT (1)
#endif
#ifndef ffconfigINCLUDE_SHORT_NAME
#define ffconfigINCLUDE_SHORT_NAME (0)
#endif
#ifndef ffconfigSHORTNAME_CASE
#define ffconfigSHORTNAME_CASE (0)
#endif
#ifndef ffconfigUNICODE_UTF16_SUPPORT
#define ffconfigUNICODE_UTF16_SUPPORT (0)
#endif
#ifndef ffconfigUNICODE_UTF8_SUPPORT
#define ffconfigUNICODE_UTF8_SUPPORT (1)
#endif
#ifndef ffconfigFAT12_SUPPORT
#define ffconfigFAT12_SUPPORT (0)
#endif
#ifndef ffconfigOPTIMISE_UNALIGNED_ACCESS
#define ffconfigOPTIMISE_UNALIGNED_ACCESS (1)
#endif
#ifndef ffconfigCACHE_WRITE_THROUGH
#define ffconfigCACHE_WRITE_THROUGH (0)
#endif
#ifndef ffconfigWRITE_BOTH_FATS
#define ffconfigWRITE_BOTH_FATS (0)
#endif
#ifndef ffconfigWRITE_FREE_COUNT
#define ffconfigWRITE_FREE_COUNT (0)
#endif
#ifndef ffconfigTIME_SUPPORT
#define ffconfigTIME_SUPPORT (1)
#endif
#ifndef ffconfigREMOVABLE_MEDIA
#define ffconfigREMOVABLE_MEDIA (1)
#endif
#ifndef ffconfigMOUNT_FIND_FREE
#define ffconfigMOUNT_FIND_FREE (0)
#endif
#ifndef ffconfigFSINFO_TRUSTED
#define ffconfigFSINFO_TRUSTED (1)
#endif
#ifndef ffconfigPATH_CACHE
#define ffconfigPATH_CACHE (0)
#endif
#ifndef ffconfigPATH_CACHE_DEPTH
#define ffconfigPATH_CACHE_DEPTH (5)
#endif
#ifndef ffconfigHASH_CACHE
#define ffconfigHASH_CACHE (0)
#endif
#ifndef ffconfigHASH_FUNCTION
#define ffconfigHASH_FUNCTION (CRC16)
#endif
#ifndef ffconfigMKDIR_RECURSIVE
#define ffconfigMKDIR_RECURSIVE (0)
#endif
#ifndef ffconfigMALLOC
#if (BSP_CFG_RTOS == 2)
#define ffconfigMALLOC (pvPortMalloc)
#elif (BSP_CFG_RTOS == 0)
#define ffconfigMALLOC (malloc)
#endif
#endif
#ifndef ffconfigFREE
#if (BSP_CFG_RTOS == 2)
#define ffconfigFREE (vPortFree)
#elif (BSP_CFG_RTOS == 0)
#define ffconfigFREE (free)
#endif
#endif
#ifndef ffconfig64_NUM_SUPPORT
#define ffconfig64_NUM_SUPPORT (0)
#endif
#ifndef ffconfigMAX_PARTITIONS
#define ffconfigMAX_PARTITIONS (4)
#endif
#ifndef ffconfigMAX_FILE_SYS
#define ffconfigMAX_FILE_SYS (4)
#endif
#ifndef ffconfigDRIVER_BUSY_SLEEP_MS
#define ffconfigDRIVER_BUSY_SLEEP_MS (20)
#endif
#ifndef ffconfigFPRINTF_SUPPORT
#define ffconfigFPRINTF_SUPPORT (0)
#endif
#ifndef ffconfigFPRINTF_BUFFER_LENGTH
#define ffconfigFPRINTF_BUFFER_LENGTH (128)
#endif
#ifndef ffconfigINLINE_MEMORY_ACCESS
#define ffconfigINLINE_MEMORY_ACCESS (0)
#endif
#ifndef ffconfigFAT_CHECK
#define ffconfigFAT_CHECK (0)
#endif
#ifndef ffconfigMAX_FILENAME
#define ffconfigMAX_FILENAME (129)
#endif
#ifndef ffconfigUSE_DELTREE
#define ffconfigUSE_DELTREE (0)
#endif
#ifndef FF_PRINTF
#define FF_PRINTF
#endif