Skip to content

Commit ea5e1ca

Browse files
authored
[dfs][elmfat] Update elm-fatfs to R0.16
1 parent ea13820 commit ea5e1ca

14 files changed

Lines changed: 2905 additions & 2345 deletions

File tree

components/dfs/dfs_v1/filesystems/elmfat/00history.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,3 +357,33 @@ R0.14b (April 17, 2021)
357357
Fixed some compiler warnings.
358358

359359

360+
361+
R0.15 (November 6, 2022)
362+
Changed user provided synchronization functions in order to completely eliminate the platform dependency from FatFs code.
363+
FF_SYNC_t is removed from the configuration options.
364+
Fixed a potential error in f_mount when FF_FS_REENTRANT.
365+
Fixed file lock control FF_FS_LOCK is not mutal excluded when FF_FS_REENTRANT && FF_VOLUMES > 1 is true.
366+
Fixed f_mkfs() creates broken exFAT volume when the size of volume is >= 2^32 sectors.
367+
Fixed string functions cannot write the unicode characters not in BMP when FF_LFN_UNICODE == 2 (UTF-8).
368+
Fixed a compatibility issue in identification of GPT header.
369+
370+
371+
372+
R0.15a (November 22, 2024)
373+
Fixed a complie error when FF_FS_LOCK != 0.
374+
Fixed a potential issue when work FatFs concurrency with FF_FS_REENTRANT, FF_VOLUMES >= 2 and FF_FS_LOCK > 0.
375+
Made f_setlabel() accept a volume label in Unix style volume ID when FF_STR_VOLUME_ID == 2.
376+
Made FatFs update PercInUse field in exFAT VBR. (A preceding f_getfree() is needed for the accuracy)
377+
378+
379+
380+
R0.15b (June 21, 2025)
381+
Added support for timestamp of created time. (FF_FS_CRTIME)
382+
Fixed FatFs fails to load the FsInfo in FAT32 volumes and the f_getfree always be forced a full FAT scan which takes a long time. (appeared at R0.15a)
383+
384+
385+
386+
R0.16 (July 22, 2025)
387+
Removed a long-pending limitation that f_getcwd and double-dot .. in the path name did not work on the exFAT volume.
388+
Fixed f_readdir cannot detect end of directory and it leads the application process into infinite loop. (appeared at R0.15b)
389+
Fixed dot names with terminating separator or duplicated separator are rejected when LFN is not enabled.

components/dfs/dfs_v1/filesystems/elmfat/00readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FatFs Module Source Files R0.14b
1+
FatFs Module Source Files R0.16
22

33

44
FILES

components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -997,41 +997,41 @@ DWORD get_fattime(void)
997997
}
998998

999999
#if FF_FS_REENTRANT
1000-
int ff_cre_syncobj(BYTE drv, FF_SYNC_t *m)
1000+
static rt_mutex_t Mutex[FF_VOLUMES + 1];
1001+
1002+
int ff_mutex_create (int vol)
10011003
{
10021004
char name[8];
10031005
rt_mutex_t mutex;
10041006

1005-
rt_snprintf(name, sizeof(name), "fat%d", drv);
1007+
rt_snprintf(name, sizeof(name), "fat%d", vol);
10061008
mutex = rt_mutex_create(name, RT_IPC_FLAG_PRIO);
10071009
if (mutex != RT_NULL)
10081010
{
1009-
*m = mutex;
1011+
Mutex[vol] = mutex;
10101012
return RT_TRUE;
10111013
}
10121014

10131015
return RT_FALSE;
10141016
}
10151017

1016-
int ff_del_syncobj(FF_SYNC_t m)
1018+
void ff_mutex_delete (int vol)
10171019
{
1018-
if (m != RT_NULL)
1019-
rt_mutex_delete(m);
1020-
1021-
return RT_TRUE;
1020+
if (Mutex[vol] != RT_NULL)
1021+
rt_mutex_delete(Mutex[vol]);
10221022
}
10231023

1024-
int ff_req_grant(FF_SYNC_t m)
1024+
int ff_mutex_take (int vol)
10251025
{
1026-
if (rt_mutex_take(m, FF_FS_TIMEOUT) == RT_EOK)
1026+
if (rt_mutex_take(Mutex[vol], FF_FS_TIMEOUT) == RT_EOK)
10271027
return RT_TRUE;
10281028

10291029
return RT_FALSE;
10301030
}
10311031

1032-
void ff_rel_grant(FF_SYNC_t m)
1032+
void ff_mutex_give (int vol)
10331033
{
1034-
rt_mutex_release(m);
1034+
rt_mutex_release(Mutex[vol]);
10351035
}
10361036

10371037
#endif

components/dfs/dfs_v1/filesystems/elmfat/diskio.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*-----------------------------------------------------------------------/
2-
/ Low level disk interface modlue include file (C)ChaN, 2019 /
2+
/ Low level disk interface modlue include file (C)ChaN, 2025 /
33
/-----------------------------------------------------------------------*/
44

55
#ifndef _DISKIO_DEFINED
@@ -55,7 +55,7 @@ DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
5555
#define CTRL_EJECT 7 /* Eject media */
5656
#define CTRL_FORMAT 8 /* Create physical format on the media */
5757

58-
/* MMC/SDC specific ioctl command */
58+
/* MMC/SDC specific ioctl command (Not used by FatFs) */
5959
#define MMC_GET_TYPE 10 /* Get card type */
6060
#define MMC_GET_CSD 11 /* Get CSD */
6161
#define MMC_GET_CID 12 /* Get CID */
@@ -65,7 +65,7 @@ DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
6565
#define ISDIO_WRITE 56 /* Write data to SD iSDIO register */
6666
#define ISDIO_MRITE 57 /* Masked write data to SD iSDIO register */
6767

68-
/* ATA/CF specific ioctl command */
68+
/* ATA/CF specific ioctl command (Not used by FatFs) */
6969
#define ATA_GET_REV 20 /* Get F/W revision */
7070
#define ATA_GET_MODEL 21 /* Get model name */
7171
#define ATA_GET_SN 22 /* Get serial number */

0 commit comments

Comments
 (0)