samples: fs: fat_fs: Add RAM disk sample for nrf52840dk
Add configuration for nrf52840dk that allows to create RAM disk; this configuration does not reserve special region in RAM using DTS but uses automatic buffer allocation, by RAM Disk Drivers, according to RAM disk specification in DTS. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
parent
63692c1349
commit
d5e321516a
|
@ -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
|
|
@ -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>;
|
||||
};
|
||||
};
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue