Browse Source
Sample for FAT fs is reworked to run also with Ext2 file system Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>pull/61126/head
21 changed files with 119 additions and 33 deletions
@ -1,20 +1,21 @@ |
|||||||
# |
# |
||||||
# Copyright (c) 2023 Nordic Semiconductor ASA |
# Copyright (c) 2023 Nordic Semiconductor ASA |
||||||
|
# Copyright (c) 2023 Antmicro <www.antmicro.com> |
||||||
# |
# |
||||||
# SPDX-License-Identifier: Apache-2.0 |
# SPDX-License-Identifier: Apache-2.0 |
||||||
# |
# |
||||||
|
|
||||||
mainmenu "FAT Filesystem Sample Application" |
mainmenu "Filesystems Sample Application" |
||||||
|
|
||||||
config SAMPLE_FATFS_CREATE_SOME_ENTRIES |
config FS_SAMPLE_CREATE_SOME_ENTRIES |
||||||
bool "When no files are found on mounted partition create some" |
bool "When no files are found on mounted partition create some" |
||||||
default y |
default y |
||||||
help |
help |
||||||
In case when no files could be listed, because there are none, |
In case when no files could be listed, because there are none, |
||||||
"some.dir" directory and "other.txt" file will be created |
"some.dir" directory and "other.txt" file will be created |
||||||
and list will run again to show them. This is useful when |
and list will run again to show them. This is useful when |
||||||
showing how FAT works on non-SD devices like internal flash |
showing how file system works on non-SD devices like internal |
||||||
or (Q)SPI connected memories, where it is not possible to |
flash or (Q)SPI connected memories, where it is not possible to |
||||||
easily add files with use of other device. |
easily add files with use of other device. |
||||||
|
|
||||||
source "Kconfig.zephyr" |
source "Kconfig.zephyr" |
@ -0,0 +1,20 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2023 Antmicro |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: Apache-2.0 |
||||||
|
*/ |
||||||
|
|
||||||
|
&spi2 { |
||||||
|
status = "okay"; |
||||||
|
|
||||||
|
sdhc0: sdhc@0 { |
||||||
|
compatible = "zephyr,sdhc-spi-slot"; |
||||||
|
reg = <0>; |
||||||
|
status = "okay"; |
||||||
|
mmc { |
||||||
|
compatible = "zephyr,sdmmc-disk"; |
||||||
|
status = "okay"; |
||||||
|
}; |
||||||
|
spi-max-frequency = <20000000>; |
||||||
|
}; |
||||||
|
}; |
@ -0,0 +1,20 @@ |
|||||||
|
# Copyright (c) 2023 Antmicro <www.antmicro.com> |
||||||
|
# SPDX-License-Identifier: Apache-2.0 |
||||||
|
|
||||||
|
CONFIG_LOG=y |
||||||
|
CONFIG_LOG_MODE_IMMEDIATE=y |
||||||
|
|
||||||
|
CONFIG_MAIN_STACK_SIZE=2048 |
||||||
|
|
||||||
|
CONFIG_FILE_SYSTEM=y |
||||||
|
CONFIG_FILE_SYSTEM_EXT2=y |
||||||
|
|
||||||
|
# Enable to allow formatting |
||||||
|
# CONFIG_FILE_SYSTEM_MKFS=y |
||||||
|
# CONFIG_TEST_RANDOM_GENERATOR=y |
||||||
|
|
||||||
|
CONFIG_DISK_ACCESS=y |
||||||
|
CONFIG_DISK_DRIVER_SDMMC=y |
||||||
|
|
||||||
|
# First block of first partition after GPT |
||||||
|
CONFIG_EXT2_DISK_STARTING_SECTOR=2082 |
Loading…
Reference in new issue