Commit Graph

87 Commits

Author SHA1 Message Date
Tomáš Rohlínek 8c9d62de98 feat(storage/vfs): Remove old API usage 2025-12-16 17:48:55 +08:00
sonika.rathi 075417de1a fix(fatfs): In vfs_fat_* calls, add _lock_acquire in missing places 2025-11-27 15:24:29 +01:00
sonika.rathi 6216b017f0 feat(vfs): add 'fatfs' host test to include 'vfs' support 2025-11-05 09:49:21 +01:00
Adam Múdry beaf579f9b fix(storage): Refactor FATFS VFS functions to be easier to understand 2025-09-26 18:17:15 +08:00
armando 00022a379a change: remove deprecated items 2025-09-15 10:52:28 +08:00
Alexey Lapshin e82d51a9ee fix(picolibc): fix missed headers in sources 2025-06-25 18:01:50 +07:00
Tomáš Rohlínek df8a16281b feat(storage/fatfs): increase log legibility for fatfs mount 2025-02-28 14:59:48 +01:00
Martin Vychodil aa23c8099d Merge branch 'fix/vfs_compiler_warings' into 'master'
fix(components): Compiler reports some warnings

Closes IDFGH-14289

See merge request espressif/esp-idf!36692
2025-02-07 15:22:25 +08:00
safocl 4da9b8654c fix(storage/fatfs): Compiler unused warning
esp-idf/components/fatfs/diskio/diskio_rawflash.c warning: unused variable 'part' [-Wunused-variable]
   XX |     const esp_partition_t* part = s_ff_raw_handles[pdrv];
      |                            ^~~~
esp-idf/components/fatfs/vfs/vfs_fat_sdmmc.c warning: unused variable 'found' [-Wunused-variable]
  XXX |     bool found = s_get_context_id_by_card(card, &id);
      |          ^~~~~
2025-01-31 23:26:12 +04:00
Tomáš Rohlínek a700e7c210 fix(storage/fatfs): use standard flex-array fields, instead of extension 2025-01-29 09:08:44 +01:00
Ivan Grokhotkov a1042c0cc2 feat(fatfs): add support for a few fcntl commands 2024-12-03 15:32:58 +01:00
Alexey Lapshin 888b5f7e8d feat(newlib): add picolibc support 2024-12-02 21:35:56 +07:00
Tomáš Rohlínek fdffba6f4c feat(storage/fatfs): move fatfs to new VFS API 2024-11-21 07:41:40 +01:00
sonika.rathi 459f2517a8 feat(fatfs): enable partition handling for sectors less than 128 2024-10-08 13:35:08 +02:00
Alexey Lapshin 4c87af6359 fix(build): fix calloc warnings 2024-09-08 13:53:52 +07:00
Adam Múdry a1f493b50f fix(vfs): FATFS mount immediately after format if mount failed 2024-07-23 15:44:40 +02:00
sonika.rathi 8e3e642db4 fix(fatfs): fix memory overlapping issue in vfs_fat.c 2024-05-22 13:06:59 +02:00
sonika.rathi a1e06ebab0 fix(vfs): fix coverity issue copy of overlapping memory in vfs_fat.c 2024-05-06 13:57:08 +02:00
Sonika Rathi e17da6f9f9 fix(fatfs): Optimizes vfs_fat_stat function to get stat structure after readdir
Closes https://github.com/espressif/esp-idf/issues/10220
2024-04-22 09:07:15 +02:00
Tomáš Rohlínek f398b7923a fix(storage/fatfs): fix double mouting of spiflash 2024-04-12 10:26:22 +02:00
Ivan Grokhotkov 10cc15b150 fix(storage): applied spelling fixes by codespell pre-commit hook 2024-03-28 13:00:54 +01:00
Adam Múdry 40de3816ec fix(fatfs): Fix leak of malloced FIL struct
In esp_vfs_fat_create_contiguous_file and esp_vfs_fat_test_contiguous_file functions
2024-03-12 13:25:09 +01:00
Adam Múdry b76123af06 Merge branch 'feature/fatfs_expand_files_api' into 'master'
feat(fatfs): Allow expanding files with seeking and truncating functions

Closes IDFGH-12035

See merge request espressif/esp-idf!28945
2024-03-04 20:56:44 +08:00
Adam Múdry 35e312c48e feat(fatfs): Allow expanding files with seeking and truncating functions
Closes https://github.com/espressif/esp-idf/issues/13100
2024-02-29 01:01:32 +01:00
Adam Múdry 8d3e79971e feat(fatfs): Add f_expand function as esp_vfs_fat_create_contiguous_file
Add esp_vfs_fat_test_contiguous_file to test it
2024-02-22 16:05:28 +01:00
Marius Vikhammer af6657b43b fix(fatfs): temp remove deprecated attribute from esp_vfs_fat_register
Causes build-errors internally in CI, should deprecate after external
components have been upgraded
2024-02-22 17:48:32 +08:00
Adam Múdry 5f961537cc feat(storage/fatfs): Switch to a config struct for VFS FAT registration 2024-02-19 14:05:50 +01:00
Adam Múdry 88e4fd9ac1 fix(vfs): Add missing lock release in vfs_fat_truncate 2024-02-08 14:16:19 +01:00
Adam Múdry 376ea7e4ed feat(fatfs): VFS FATFS add format functions with config argument 2024-01-29 15:09:50 +08:00
Adam Múdry 8e50d63fea feat(fatfs): Add an option to use 2 FATs (file allocation tables) in FATFS volumes
Should help with redundancy and data corruption when enabled but uses more space.
2024-01-18 14:03:28 +01:00
Adam Múdry 29c30b961d fix: esp_vfs_fat_sdcard_format workbuf memory leak 2023-11-29 12:39:15 +01:00
Tomáš Rohlínek 91e158aa0c fix(storage/fatfs): add missing locks in fatfs wrapper for vfs 2023-11-27 07:47:28 +01:00
Adam Múdry 25714837cf fix(storage): FATFS WL function formatting wrong partition
Closes https://github.com/espressif/esp-idf/issues/12542

Co-authored-by: Tony Stuart <anthonyfstuart@gmail.com>
2023-11-23 13:54:00 +01:00
Armando 5b8d904a9b refactor(sdmmc): dependency inversion to sdmmc component 2023-11-16 15:37:32 +08:00
Tomáš Rohlínek 3f4698ac47 fix(storage/fatfs): add missing lock release introduced by IMMEDIATE_FSYNC 2023-10-30 10:22:08 +01:00
sonika.rathi 91eada4acc fix(fatfs): free allocated memory for base path before unmounting the card 2023-10-25 09:33:42 +02:00
Adam Múdry 0024867c3b Merge branch 'feature/add_optional_immediate_fsync' into 'master'
fatfs: add optional immediate fsync

See merge request espressif/esp-idf!26097
2023-10-16 17:37:22 +08:00
Adam Múdry ab1eb37fe8 feat(partition_table): Add read-only partition flag and functionality 2023-10-11 00:01:05 +02:00
Tomáš Rohlínek 525776f748 feat(vfs/fatfs): Add option for automatic immediate fsync 2023-10-02 07:06:05 +02:00
Adam Múdry ebde53bbb9 docs(fatfs): Move mentioned APIs to a separate API reference section 2023-08-04 23:47:44 +00:00
Sonika Rathi b31b68fc68 bugfix: fix for fatfs "open("xx",O_CREAT|O_WRONLY,0666)" call failure
fatfs 'open' with only O_CREAT flag fails to creat new file

Closes https://github.com/espressif/esp-idf/issues/1817
2023-04-18 09:57:44 +05:30
Chip Weinberger 74d6215b7f [SDMMC] add reasonable timeouts to all while loops
Closes: https://github.com/espressif/esp-idf/pull/10532
2023-04-11 11:06:56 +00:00
Adam Múdry 16915556a3 fatfs: fstat - enable setting a custom preferred block size
Enables setting a custom st_blksize in fatfs vfs fstat function.
Directly affects file buffer size for fatfs.
Increasing the value helps with fread and fgets speeds, however increases heap usage.
Added info to docs about improving I/O performance.
2023-03-08 09:09:47 +01:00
Armando 0a472225cc fatfs: fix deadcode issue 2023-02-27 11:25:29 +00:00
Armando d59fd3e529 fatfs: deprecate esp_vfs_fat_sdmmc_unmount
This API was deprecated before, but without deprecation warning and
migration doc. This commit added deprecation warning and migration doc
to it.
2023-02-16 14:17:51 +08:00
Armando 90a6018e67 fatfs: added an API to format FAT on sdcard 2023-02-16 14:17:51 +08:00
Armando 4150bfb403 fatfs: added an API to format FAT on spiflash 2023-02-16 12:19:35 +08:00
Armando 1bd8018a59 vfs_fat_spiflash: use esp_check 2023-02-14 09:22:17 +00:00
Ivan Grokhotkov 23e1ae1bc2 storage: fix and re-enable -Wformat warnings 2022-10-06 16:16:32 +02:00
John aaf35889b6 Change placeholder in ESP_LOGD conditionally depending on FF_FS_EXFAT
In case of using EXFAT by setting in ffconf.h:
the type FSIZE_t is changing from 4 to 8 bytes.

As a result,  ESP_LOGD() in vfs_fat_lseek() does not compile:
error: format '%d' expects argument of type 'int', but argument 8 has type 'FSIZE_t' {aka 'long long unsigned int'} [-Werror=format=]
     ESP_LOGD(TAG, "%s: offset=%ld, filesize:=%d", __func__, new_pos, f_size(file));

To solve the problem we need to change %d with %lld conditionally, depending on FF_FS_EXFAT.

Closes https://github.com/espressif/esp-idf/pull/9361
2022-07-22 16:52:14 +01:00