forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
samples/subsys/settings: FS and native_posix support
Added support for native_posix targets. Added setting FS back-end initialization which is used by native_posix targets. The test harness was adapted to the fact that key-value pairs read-out order might be different for each back-end when call settings_load(). Signed-off-by: Andrzej Puzdrowski <[email protected]>
- Loading branch information
Showing
6 changed files
with
98 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the LittleFS file system. | ||
CONFIG_FILE_SYSTEM=y | ||
CONFIG_FILE_SYSTEM_LITTLEFS=y | ||
CONFIG_SETTINGS_FS=y | ||
CONFIG_SETTINGS_FS_DIR="/ff/settings" | ||
CONFIG_SETTINGS_FS_FILE="/ff/settings/run" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright (c) 2019 Jan Van Winkel <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/delete-node/ &storage_partition; | ||
/delete-node/ &scratch_partition; | ||
|
||
&flash0 { | ||
/* | ||
* For more information, see: | ||
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions | ||
*/ | ||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
storage_partition: partition@70000 { | ||
label = "storage"; | ||
reg = <0x00070000 0x8000>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Enable the LittleFS file system. | ||
CONFIG_FILE_SYSTEM=y | ||
CONFIG_FILE_SYSTEM_LITTLEFS=y | ||
CONFIG_SETTINGS_FS=y | ||
CONFIG_SETTINGS_FS_DIR="/ff/settings" | ||
CONFIG_SETTINGS_FS_FILE="/ff/settings/run" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright (c) 2019 Jan Van Winkel <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/delete-node/ &storage_partition; | ||
/delete-node/ &scratch_partition; | ||
|
||
&flash0 { | ||
/* | ||
* For more information, see: | ||
* http://docs.zephyrproject.org/latest/guides/dts/index.html#flash-partitions | ||
*/ | ||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
storage_partition: partition@70000 { | ||
label = "storage"; | ||
reg = <0x00070000 0x8000>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters