1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

64 Commits

Author SHA1 Message Date
Benjamin Valentin
6991b0975d pkg/fatfs: bump to r0.15
- Changed user provided synchronization functions in order to completely eliminate the platform dependency from FatFs code.
 - Fixed a potential error in f_mount when FF_FS_REENTRANT.
 - Fixed file lock control FF_FS_LOCK is not mutal excluded when FF_FS_REENTRANT && FF_VOLUMES > 1 is true.
 - Fixed f_mkfs creates broken exFAT volume when the size of volume is >= 2^32 sectors.
 - Fixed string functions cannot write the unicode characters not in BMP when FF_LFN_UNICODE == 2 (UTF-8).
 - Fixed a compatibility issue in identification of GPT header.
2023-03-05 00:46:06 +01:00
Benjamin Valentin
85dd564f87 vfs: drop unused abs_path parameter 2022-09-29 22:01:37 +02:00
chrysn
feff412bcc pkg: Move versions to dedicated line
Makefiles don't do comments, so these were forwarded into the variable.
*Most* users would expand the arguments to a shell where it'd be
ignored, but not all of them.

Contributes-To: https://github.com/RIOT-OS/RIOT/pull/18489

(This is also where the one version that is added here was removed).
2022-09-26 17:45:54 +02:00
Benjamin Valentin
bc7fb8f678 pkg/fatfs: enable RTC support if rtt_rtc is used 2022-04-11 14:25:44 +02:00
Juergen Fitschen
77dfa47da8
Merge pull request #17865 from jue89/fix/fatfs_vfs_format_mutex
pkg/fatfs: fix missing mutex header
2022-03-25 22:08:55 +01:00
Jue
67fc79707f pkg/fatfs: include missing mutex headers 2022-03-25 17:40:19 +01:00
Benjamin Valentin
805bfc754a pkg/fatfs: enable exFAT support
Enabling exFAT requires enabling long file names, so enable LFN if
exFAT is enabled.
exFAT (and LFN) also requires bumping the per-file/per-dir buffer.

Can be tested with

    CFLAGS += -DFATFS_FFCONF_OPT_FS_EXFAT=1
2022-03-11 13:21:46 +01:00
Benjamin Valentin
6a54a39b0f pkg/fatfs: document some compile-time options 2022-02-25 16:31:44 +01:00
Benjamin Valentin
2aa41b1a44 pkg/fatfs: ensure volume is initialized before formatting 2022-02-22 15:13:22 +01:00
Benjamin Valentin
93cd0bcc57 pkg/fatfs: add config path to NATIVEINCLUDES
Since `ffconf.h` gets included by `vfs.h` which gets included by
`native` code, this header needs to be available to the `native` cpu
module too.
2022-02-22 15:03:55 +01:00
Benjamin Valentin
5b246d02c0 pkg/fatfs: fatfs_vfs: wire up format() 2022-02-16 14:30:08 +01:00
chrysn
25882133f8
Merge pull request #17634 from benpicco/pkg/fatfs-statvfs
pkg/fatfs: implement statvfs()
2022-02-12 15:25:04 +01:00
chrysn
2cb4b70458 vfs / treewide: Remove manual zeroing of vfs stat buffers 2022-02-12 12:31:38 +01:00
Benjamin Valentin
9982cf5c3e pkg/fatfs: implement statvfs()
This hooks up the statvfs() function to query file system properties.
2022-02-11 14:05:27 +01:00
benpicco
be45400631
Merge pull request #17341 from benpicco/vfs-mtd_cleanup
sys/vfs: add file-system auto-mount
2022-02-09 21:50:34 +01:00
Benjamin Valentin
8f47684343 pkg/fatfs: ensure max sector size is not exceeded 2022-02-09 12:21:53 +01:00
Benjamin Valentin
ae06265de0 pkg/fatfs: VFS: internally handle fatfs_mtd_devs
This makes FAT behave more like the other file systems supported by VFS.
The `fatfs_mtd_devs` array is populated internally so the application does
not have to handle this.
2022-02-09 12:21:53 +01:00
Benjamin Valentin
d1cfec4a65 pkg/fatfs: hook up vfs_fsync() 2022-02-07 16:13:04 +01:00
Benjamin Valentin
a8694571cf pkg/fatfs: fix build on AVR 2022-01-06 14:28:38 +01:00
Marian Buschsieweke
92d75695b5
pkg/fatfs: use static_assert() instead of BUILD_BUG_ON() 2022-01-05 15:09:09 +01:00
07e46cef0e
Merge pull request #16412 from benpicco/pkg/fatfs-r0.14b
pkg/fatfs: bump version to r0.14b
2022-01-03 19:09:37 +01:00
Benjamin Valentin
49e609a631 pkg/fatfs: bump version to r0.14b
R0.14b (April 17, 2021)
  Made FatFs uses standard library <string.h> for copy, compare and search instead of built-in string functions.
  Added support for long long integer and floating point to f_printf(). (FF_STRF_LLI and FF_STRF_FP)
  Made path name parser ignores the terminating separator to allow "dir/".
  Improved the compatibility in Unix style path name feature.
  Fixed the file gets dead-locked when f_open() failed with some conditions. (appeared at R0.12a)
  Fixed f_mkfs() can create wrong exFAT volume due to a timing dependent error. (appeared at R0.12)
  Fixed code page 855 cannot be set by f_setcp(). (appeared at R0.13)
  Fixed some compiler warnings.

  - http://elm-chan.org/fsw/ff/updates.txt
2022-01-03 17:23:46 +01:00
Marian Buschsieweke
83f86d471b
pkg/fatfs/fatfs_vfs: silence -Wcast-align
The -Wcast-align warnings are false positives. Hence, document
the reason why unaligned accesses cannot occur and silence the
warning.
2021-12-03 10:12:33 +01:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
9bd22dba79
pkg: silent make commands with RIOT_CI_BUILD=1 2021-03-12 16:05:18 +01:00
Benjamin Valentin
f3780bb00c pkg/fatfs: bump version to r0.14a
R0.14a (December 05, 2020)
  Limited number of recursive calls in f_findnext().
  Fixed old floppy disks formatted with MS-DOS 2.x and 3.x cannot be mounted.
  Fixed some compiler warnings.

 - http://elm-chan.org/fsw/ff/updates.txt
2021-01-31 20:03:13 +01:00
Benjamin Valentin
60eb75da3c mtd: rename mtd_write_page() -> mtd_write_page_raw()
The function will not abstract away the behavior of the underlying media
(e.g. whether only 1 -> 0 writes are possible without erase), thus rename it.
2021-01-26 11:48:26 +01:00
Benjamin Valentin
33449a4409 pkg/fatfs: bump version to r0.14 2020-11-17 11:29:28 +01:00
chrysn
b6392d63ef vfs: Provide generic stat implementation (and use in fatfs)
When a file system has `fstat` and `open` implemented, `stat` can still
be missing. The new function is a generic implementation, and used in
fatfs to provide a `stat`.
2020-10-25 17:39:57 +01:00
Bas Stottelaar
38a5ff7d4b pkg/*: realign ENABLE_DEBUG 2020-10-23 02:43:10 +02:00
Bas Stottelaar
970c72a0cb pkg/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
Benjamin Valentin
c436c39ea8 pkg/fatfs: use page-wise read() and write()
The FAT file system operates on sectors (pages), so use the new
mtd_write_page() and mtd_read_page() functions.

This also avoids the wrap-around after reading/writing past 4 GiB.
2020-08-18 17:25:39 +02:00
Sven Herrmann
75a9ad0be1 pkg/fatfs/fatfs_vfs: fix fstat 2020-06-30 07:45:08 +00:00
benpicco
3af5efe5cd
Merge pull request #14175 from sven-hm/fatfs_vfs_open_flag_translation
pkg/fatfs/fatfs_vfs: fix flag translation in _open
2020-06-29 23:40:55 +02:00
Sven Herrmann
4469d8f0fb pkg/fatfs/fatfs_vfs: fix flag translation in _open 2020-06-29 10:06:28 +00:00
385ad95701
pkg: adapt 'simple' packages to the new organization 2020-06-26 09:25:43 +02:00
a009684336
pkg: use Makefile.base to build pkg modules when possible 2020-06-12 18:44:49 +02:00
9464c34467
pkg: don't copy Makefile in package build directory
Instead use the '-f' option of the make command
2020-06-12 18:44:48 +02:00
eee5bf178d
Merge pull request #13993 from benpicco/examples/filesystem-fatfs
examples/filesystem: add support for fatfs on SD card
2020-05-26 19:20:47 +02:00
Benjamin Valentin
3b2cfa6478 drivers/sdcard_spi: add auto_init_storage to DEFAULT_MODULE
sdcard_spi is the only driver in auto_init_storage and was previously
pulled in by fatsfs (because it's used on SD cards)

It does however make much more sense if the SD card driver pulls that in
so other file systems can be used on SD card too.
2020-05-20 11:57:05 +02:00
fabian18
a3a1c160ee mtd: Change API to return 0 on success
Returning the number of bytes written/read could return a negative integer
because a uint32_t is expected for the length in read()/write() operations.
2020-05-06 20:24:27 +02:00
Koos
b34b11a0c6 pkg/fatfs: fix day_of_month value of get_fattime() 2020-04-03 11:27:10 +02:00
Francisco Molina
7bfb855a86
Makefile.dep: auto_init_% as DEFAULT_MODULES
Having the modules as DEFAULT_MODULES allows disabling them.
2020-02-12 16:51:32 +01:00
Gaëtan Harter
ca5d13cc2a pkg/*: adapt to new state file targets
Prepare for handling pkg state with files. So it requires having the
path defined before declaring targets. In addition, it cleans up the
old git-download target.
2020-01-08 20:55:19 +01:00
591d08500a pkg/fatfs: fix typos 2019-11-23 22:39:38 +01:00
Francisco Molina
45c8eafd42 Makefile.include: remove repeated OS declaration 2019-10-18 10:36:43 +02:00
Francisco Molina
f3482de277 REMOVEME: add OS and OS_ARCH variable 2019-10-18 08:46:51 +02:00
ce9b1e3826 pkg: remove not needed git-downloaded dependencies
This is implicitly done by the "pkg-prepare"-step of the main make
instance.
2019-06-28 09:38:44 +02:00
Gaëtan Harter
c7de150ec3
pkg/fatfs: fix declaration of periph_rtc optional dependency
* Declare optional dependency to periph_rtc
* Move CFLAGS definition to Makefile.include
2018-11-19 15:59:54 +01:00
70407a1a3e pkg*: fix doxygen grouping 2018-06-11 19:12:02 +02:00