From 7331a9ea26ca56eaa8788c7c5bd39dabb9f9936f Mon Sep 17 00:00:00 2001 From: Andrzej Puzdrowski Date: Thu, 9 Jan 2020 13:45:57 +0100 Subject: [PATCH] samples/subsys/shell/fs: remove nffs configuration NFFS configuration was removed. Added working configuration for nRF boards. Documentation aligned to fact that littlefs is supported. Signed-off-by: Andrzej Puzdrowski --- samples/subsys/shell/fs/CMakeLists.txt | 14 ++++++++++++++ samples/subsys/shell/fs/README.rst | 10 +++++----- samples/subsys/shell/fs/boards/native_posix.conf | 2 -- .../subsys/shell/fs/boards/native_posix_64.conf | 2 -- samples/subsys/shell/fs/boards/reel_board.conf | 2 -- samples/subsys/shell/fs/mpu.conf | 1 + samples/subsys/shell/fs/prj.conf | 1 - 7 files changed, 20 insertions(+), 12 deletions(-) delete mode 100644 samples/subsys/shell/fs/boards/reel_board.conf create mode 100644 samples/subsys/shell/fs/mpu.conf diff --git a/samples/subsys/shell/fs/CMakeLists.txt b/samples/subsys/shell/fs/CMakeLists.txt index b1fbdf1cf8b..83da2689839 100644 --- a/samples/subsys/shell/fs/CMakeLists.txt +++ b/samples/subsys/shell/fs/CMakeLists.txt @@ -2,8 +2,22 @@ cmake_minimum_required(VERSION 3.13.1) +if((BOARD STREQUAL nrf52840_pca10056) OR + (BOARD STREQUAL nrf52_pca10040) OR + (BOARD STREQUAL nrf9160_pca10090) OR + (BOARD STREQUAL reel_board) +) + if(EXISTS ${APPLICATION_SOURCE_DIR}/boards/${BOARD}.conf) + set(CONF_FILE "prj.conf mpu.conf boards/${BOARD}.conf") + else() + set(CONF_FILE "prj.conf mpu.conf") + endif() +endif() + include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) project(fs_shell) + + FILE(GLOB app_sources src/*.c) target_sources(app PRIVATE ${app_sources}) diff --git a/samples/subsys/shell/fs/README.rst b/samples/subsys/shell/fs/README.rst index 4157f41ee78..67d8ccdbed1 100644 --- a/samples/subsys/shell/fs/README.rst +++ b/samples/subsys/shell/fs/README.rst @@ -6,12 +6,12 @@ File system shell example Overview ******** -This example provides shell access to a NFFS file system partition in flash. +This example provides shell access to a LittleFS file system partition in flash. Requirements ************ -A board with NFFS file system support and UART console +A board with LittleFS file system support and UART console Building ******** @@ -62,11 +62,11 @@ Running Once the board has booted, you will be presented with a shell prompt. All file system related commands are available as sub-commands of fs. -Begin by mounting the NFSS file system. +Begin by mounting the LittleFS file system. .. code-block:: console - fs mount nffs /nffs + fs mount littlefs /lfs Files System Shell Commands =========================== @@ -78,7 +78,7 @@ Mount a file system partition to a given mount point .. code-block:: console - fs mount (nffs|fat) + fs mount (littlefs|fat) Ls -- diff --git a/samples/subsys/shell/fs/boards/native_posix.conf b/samples/subsys/shell/fs/boards/native_posix.conf index ed9d1985c9f..80357cdf245 100644 --- a/samples/subsys/shell/fs/boards/native_posix.conf +++ b/samples/subsys/shell/fs/boards/native_posix.conf @@ -1,3 +1 @@ CONFIG_FUSE_FS_ACCESS=y -CONFIG_FS_NFFS_FLASH_DEV_NAME="flash_ctrl" - diff --git a/samples/subsys/shell/fs/boards/native_posix_64.conf b/samples/subsys/shell/fs/boards/native_posix_64.conf index ed9d1985c9f..80357cdf245 100644 --- a/samples/subsys/shell/fs/boards/native_posix_64.conf +++ b/samples/subsys/shell/fs/boards/native_posix_64.conf @@ -1,3 +1 @@ CONFIG_FUSE_FS_ACCESS=y -CONFIG_FS_NFFS_FLASH_DEV_NAME="flash_ctrl" - diff --git a/samples/subsys/shell/fs/boards/reel_board.conf b/samples/subsys/shell/fs/boards/reel_board.conf deleted file mode 100644 index 7ca1b482865..00000000000 --- a/samples/subsys/shell/fs/boards/reel_board.conf +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_MPU_ALLOW_FLASH_WRITE=y -CONFIG_FS_NFFS_FLASH_DEV_NAME="NRF_FLASH_DRV_NAME" diff --git a/samples/subsys/shell/fs/mpu.conf b/samples/subsys/shell/fs/mpu.conf new file mode 100644 index 00000000000..6bafaa53f29 --- /dev/null +++ b/samples/subsys/shell/fs/mpu.conf @@ -0,0 +1 @@ +CONFIG_MPU_ALLOW_FLASH_WRITE=y diff --git a/samples/subsys/shell/fs/prj.conf b/samples/subsys/shell/fs/prj.conf index 784e8fbdac0..1f2863e0038 100644 --- a/samples/subsys/shell/fs/prj.conf +++ b/samples/subsys/shell/fs/prj.conf @@ -11,7 +11,6 @@ CONFIG_SHELL_LOG_LEVEL_INF=y CONFIG_FILE_SYSTEM=y CONFIG_FILE_SYSTEM_SHELL=y -CONFIG_FILE_SYSTEM_NFFS=y CONFIG_FILE_SYSTEM_LITTLEFS=y CONFIG_FLASH_MAP=y