diff --git a/samples/subsys/fs/fs_sample/boards/nrf52840dk_nrf52840_ram_disk.conf b/samples/subsys/fs/fs_sample/boards/nrf52840dk_nrf52840_ram_disk.conf new file mode 100644 index 0000000000..a4551f3318 --- /dev/null +++ b/samples/subsys/fs/fs_sample/boards/nrf52840dk_nrf52840_ram_disk.conf @@ -0,0 +1,13 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: Apache-2.0 +# + +CONFIG_DISK_DRIVERS=y +CONFIG_DISK_DRIVER_RAM=y +CONFIG_DISK_DRIVER_FLASH=n +# There may be no files on internal SoC flash, so this Kconfig +# options has ben enabled to create some if listing does not +# find in the first place. +CONFIG_FS_SAMPLE_CREATE_SOME_ENTRIES=y diff --git a/samples/subsys/fs/fs_sample/boards/nrf52840dk_nrf52840_ram_disk.overlay b/samples/subsys/fs/fs_sample/boards/nrf52840dk_nrf52840_ram_disk.overlay new file mode 100644 index 0000000000..99ad12dadb --- /dev/null +++ b/samples/subsys/fs/fs_sample/boards/nrf52840dk_nrf52840_ram_disk.overlay @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + msc_disk0 { + status="okay"; + compatible = "zephyr,ram-disk"; + /* Sample, to make things easier, mounts all FAT + * systems at "SD". + */ + disk-name = "SD"; + /* Disk size is 64kB, 128 sectors of 512B, the minimal + * required by FAT FS. + */ + sector-size = <512>; + sector-count = <128>; + }; +}; diff --git a/samples/subsys/fs/fs_sample/sample.yaml b/samples/subsys/fs/fs_sample/sample.yaml index 22d47ca3b2..9f839a45da 100644 --- a/samples/subsys/fs/fs_sample/sample.yaml +++ b/samples/subsys/fs/fs_sample/sample.yaml @@ -31,6 +31,12 @@ tests: sample.filesystem.fat_fs.nrf52840dk_nrf52840: build_only: true platform_allow: nrf52840dk/nrf52840 + sample.filesystem.fat_fs.nrf52840dk_nrf52840_ram_disk: + build_only: true + platform_allow: nrf52840dk/nrf52840 + extra_args: + - OVERLAY_CONFIG=boards/nrf52840dk_nrf52840_ram_disk.conf + - DTC_OVERLAY_FILE=boards/nrf52840dk_nrf52840_ram_disk.overlay sample.filesystem.fat_fs.nrf52840dk_nrf52840.qspi: build_only: true platform_allow: nrf52840dk/nrf52840