Skip to content

Commit b833bbd

Browse files
authored
Merge pull request #9237 from yossi2le/yossi_remove_num_entreies
Refactoring and fixing some issues in KVStore configuration.
2 parents 63eca29 + 71afcf6 commit b833bbd

File tree

5 files changed

+236
-108
lines changed

5 files changed

+236
-108
lines changed

docs/design-documents/features/storage/Configuration/CONFIGURATION.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ The following is a list of all storage parameters available and their descriptio
6262
* `TDB_EXTERNAL_NO_RBP`.
6363
* `FILESYSTEM`.
6464
* `FILESYSTEM_NO_RBP`.
65+
* `default`
66+
If default is set, the system will choose the type of storage base on the block device component set in target.json. For QSPIF, SPIF and DATAFLASH block devices TDB_EXTERNAL will be used. If SD is set a FILESYSTEM storage is set and if only FLASHIAP exists as the only block device component, a TDB_INTERNAL will be used.
6567
* `default_kv` - This is a string representing the path for the default KVStore instantiation. Applications can pass an empty path (only the key name) or pass the generated name for this parameter (`MBED_CONF_STORAGE_DEFAULT_KV`) as the path to use this configuration.
6668
* `internal_size` - The size in bytes for the internal FlashIAP block device. This, together with the `internal_base_address`, adjusts exactly the size and location where the block device resides on memory. If not defined, the block device will try to get the maximum size available.
6769
* `internal_base_address` - The address where the internal FlashIAP blockDevice starts. This helps to prevent collisions with other needs, such as firmware updates. If not defined, the start address will be set to the first sector after the application code ends in `TDB_internal`. In any external configurations with rollback protection support, it will be set to end of flash - `rbp_internal_size`.
@@ -83,7 +85,7 @@ Below is the main storage configuration `mbed_lib.json` file:
8385
"name": "storage",
8486
"config": {
8587
"storage_type": {
86-
"help": "Options are TDB_INTERNAL, TDB_EXTERNAL, TDB_EXTERNAL_NO_RBP, FILESYSTEM or FILESYSTEM_NO_RBP.",
88+
"help": "Options are TDB_INTERNAL, TDB_EXTERNAL, TDB_EXTERNAL_NO_RBP, FILESYSTEM, FILESYSTEM_NO_RBP or default. If default, the storage type will be chosen according to the component defined in targets.json",
8789
"value": "NULL"
8890
},
8991
"default_kv": {

features/storage/kvstore/conf/filesystem/mbed_lib.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
"name": "storage_filesystem",
33
"config": {
44
"rbp_internal_size": {
5-
"help": "If default the size will be 4K*#entries/32",
5+
"help": "Default is the size of the 2 last sectors of internal flash",
66
"value": "0"
77
},
8-
"rbp_number_of_entries": {
9-
"help": "If not defined default is 64",
10-
"value": "64"
11-
},
128
"internal_base_address": {
139
"help": "If default, base address is the first sector after the application code",
1410
"value": "0"

0 commit comments

Comments
 (0)