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

examples/filesystem: remove dedicated FatFS section from readme

FAT now behaves just like all other FSs and does not need special treatment.
This commit is contained in:
Benjamin Valentin 2022-02-16 14:35:17 +01:00
parent 9f4fa5ac99
commit 70d9856111
2 changed files with 3 additions and 44 deletions

View File

@ -36,6 +36,7 @@ USEMODULE += vfs
USEMODULE += littlefs2
# USEMODULE += spiffs
# USEMODULE += fatfs_vfs
# USEMODULE += fatfs_vfs_format
USEMODULE += constfs
# USEMODULE += devfs

View File

@ -7,8 +7,8 @@ application.
In particular, this example shows:
- how to mount/format/unmount a file system, either with spiffs, littlefs or
constfs
- how to mount/format/unmount a file system, either with spiffs, littlefs, fatfs
or constfs
- how to open/read/write/close a file with and without newlib
In RIOT, most file systems use a `mtd` as flash interface. So to use this
@ -76,45 +76,3 @@ Hello World!
cat /const/hello-riot
Hello RIOT!
```
## Example on `native` with `fatfs`
- Unpack the provided image proviced in the `pkg_fatfs` test:
```
$ tar vxjf ../../tests/pkg_fatfs/riot_fatfs_disk.tar.bz2
riot_fatfs_disk.img
```
- Configure the application to use the file and the right geometry by adding
these to the Makefile:
```
CFLAGS += -DMTD_NATIVE_FILENAME=\"riot_fatfs_disk.img\"
CFLAGS += -DMTD_SECTOR_NUM=262144
```
- In the Makefile, comment the `littlefs2` USEMODULE line, and enable the
`fatfs_vfs` line instead.
- Build and run the `filesystem` example application on the `native` target as above.
- Mount the external file system:
```
> mount
mount
/sda successfully mounted
```
- List the available files in the FAT partition:
```
> ls /sda
ls /sda
TEST.TXT
total 1 files
```
- You can also use the writing commands now to create and modify files; run
`vfs` for instructions.