Add an option that links in the underlying file system libraries as
usual, but doesn't compile in the Zephyr file system abstraction layer.
This can be useful to avoid linking in the entire filesystem
implementation through the `fs_file_system_t` API struct if only a
subset of the functions are used.
Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit fixes the incorrect include path for the fuse library.
pkg_search_module populates the <XXX>_INCLUDE_DIRS cmake var.
Signed-off-by: Russ Webber <russ@rw.id.au>
For native_sim we need to have the fuse library linked with the
native simulator runner, not with the embedded code.
Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fixes: #40559
Moving CMakeLists.txt gluecode into Zephyr repo minimizes the patching
needed in LittleFS repo.
It provides a dedicate Zephyr LFS config header which will define the
equivalent LittleFS settings based upon Kconfig settings.
This further reduces the patching needed in LittleFS.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
NFFS is removed as it has serious bugs (by design) which haven't
been resolved since extended range of time.
One of most serious issues bunch were described here:
https://github.com/apache/mynewt-nffs/issues/10
Since lack of support NFFS upsterem it doesn't make sense to keep
it in zephyr.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
littlefs is a fail-safe filesystem from ARM Mbed that has wear-leveling
capabilities.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Jim Paris <jim@bolt.io>
File system API functions that operate on paths are passed both the
absolute path including the mount point prefix, and the mount point
within which the path lies.
Unfortunately it's not entirely trivial to convert an arbitrary path
within the file system space to an absolute path within its mount point,
because the path may be to the mount point itself and not end with a
directory separator. The effect is that a file system implementation
like nffs may be given an empty path when "/" is required.
Add an implementation module that does this transformation and use it to
transform paths within each filesystem wrapper.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier. Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.
By default all files without license information are under the default
license of Zephyr, which is Apache version 2.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This patch removes the need for application build script code to
explicitly link 'app' with a filesystem implementation.
It does this by introducing a zephyr interface library called 'FS'
that contains the usage requirements for linking with the filesystem
library subsys__fs and using Kconfig to default to linking the 'app'
library with this interface library.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Zephyr supports fatfs, nffs and fcb as storage layer. fatfs and nffs
are less suited for application in memory restricted IC's. fcb has a
smaller footprint but has a complex api.
The proposed module is a module with a even smaller footprint compared
to fcb and a simple interface for reading and writing entries. The
module provides wear levelling of flash. This allows the module to be
used not only to store configuration settings but to store device state
(e.g. state of a light switch over reboots) of a zephyr device.
Fixes buffer overflow by introducing maximum read length in nvs_read()
and nvs_read_hist().
Fixes nvs_write() not to reflash the same data. Allows the user to do
call nvs_write() for all defined entries without worries about flash
wear.
Fixes garbage collection error where wrong data could be copied.
Add nvs_delete() to allow deleting a stored entry. A deleted entry will
not be copied to a new flash sector
Include flash wear information in the README.md documentation
0/25 Update module after reviewers remarks, added documentation to
nvs.h, removed README.md by nvs.rst in doc/subsystems folder
04/26 Update module after reviewers remarks, updated nvs.rst, added more
documentation to samples/subsys/nvs/src/main.c, updated doxygen info
in nvs.h (hope this time it works).
04/26 Update subsystems.rst to include nvs.restart
04/27 Updated nvs.c and nvs.h to avoid a possible flash deletion loop
when the file system is full.
04/29 Updated nvs_write to detect and ignore deletes of non-existing
items
05/06 Update NVS module to return standard error codes, removed low
level API, added configuration options. NVS now uses the board dts to
determine the flash storage location (FLASH_AREA_STORAGE_OFFSET).
05/06 Update nvs.rst. Updated intendation and added intermediate
variables in nvs.c to make the code easier to read.
05/06 Update nvs.rst.
05/07 Update nvs.rst
05/08 Changed the API to a more standard file system API.
05/08 Removed cnt_max from nvs_read() as it is not used.
05/08 Removed #ifdef(CONFIG_NVS_LOG) from nvs_priv.h, now the module can
be build with debugging off.
05/09 Removed configuration options for SECTOR_SIZE, SECTOR_COUNT and
MAX_ELEM_SIZE. It is now easy to support multiple NVS filesystems on
one or multiple devices. Changed logging to support newlib systems.
Thanks to Olivier Martin for reporting and proposed changes.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Add support for Virtual File system Switch (VFS) by
introducing mount point concept to Zephyr. This allows
the applications to mount multiple file systems at
different mount points (ex: "/fatfs" and "/nffs"). The
mount point structure contains all the necessary info
required to instantiate, mount and operate on file system.
Decouple applications from directly accessing individual
file systems API's or internal functions by introducing
file system registration mechanism in VFS.
Move the file system defination and mount responsibility
to application so that application can decide which file system
to use and where to mount.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Zephyr already supports NFFS as a storage layer, but it might
be a little bit too heavyweight for certain applications in
memory-restricted ICs.
This module is response for need of Lightweight flash storage
capability. FCB is ported form MyNewt as native zephyr module.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.
Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.
This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.
For users that just want to continue their work with minimal
disruption the following should suffice:
Install CMake 3.8.2+
Port any out-of-tree Makefiles to CMake.
Learn the absolute minimum about the new command line interface:
$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..
$ cd build
$ make
PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>