Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dts/common/nordic/infuse_nrf5340_cpuapp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
chosen {
zephyr,entropy = &cryptocell;
infuse,reboot-state = &retention0;
infuse,kv-partition = &storage_partition;
};

/* End of application SRAM (not in shared SRAM) */
Expand Down
1 change: 1 addition & 0 deletions dts/common/nordic/infuse_nrf5340_cpuapp_ns.dtsi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/ {
chosen {
infuse,reboot-state = &retention0;
infuse,kv-partition = &storage_partition;
};

/* End of application SRAM (not in shared SRAM) */
Expand Down
1 change: 1 addition & 0 deletions dts/common/nordic/infuse_nrf9151_ns.dtsi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/ {
chosen {
infuse,reboot-state = &retention0;
infuse,kv-partition = &storage_partition;
};

/* End of application SRAM */
Expand Down
1 change: 1 addition & 0 deletions dts/common/nordic/infuse_nrf9161_ns.dtsi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/ {
chosen {
infuse,reboot-state = &retention0;
infuse,kv-partition = &storage_partition;
};

/* End of application SRAM */
Expand Down
1 change: 1 addition & 0 deletions snippets/infuse/boards/mps2_an385.overlay
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/ {
chosen {
infuse,reboot-state = &retention0;
infuse,kv-partition = &storage_partition;
};

sram@203EFF00 {
Expand Down
1 change: 1 addition & 0 deletions snippets/infuse/boards/nrf52840dk_nrf52840.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/ {
chosen {
infuse,reboot-state = &retention0;
infuse,kv-partition = &storage_partition;
};

epacket_serial: epacket_serial {
Expand Down
4 changes: 4 additions & 0 deletions subsys/fs/kv_store/Kconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Infuse-IoT SDK key-value store

# Workaround for not being able to have commas in macro arguments
DT_CHOSEN_KV_PARTITION := infuse,kv-partition

config KV_STORE
bool "Infuse-IoT key-value storage"
depends on NVS
depends on FLASH_MAP
depends on $(dt_chosen_enabled,$(DT_CHOSEN_KV_PARTITION))

if KV_STORE

Expand Down
10 changes: 5 additions & 5 deletions subsys/fs/kv_store/kv_store.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
static struct nvs_fs fs;
static sys_slist_t cb_list;

#define NVS_PARTITION storage_partition
#define NVS_PARTITION_ID FIXED_PARTITION_ID(NVS_PARTITION)
#define NVS_PARTITION_DEVICE FIXED_PARTITION_DEVICE(NVS_PARTITION)
#define NVS_PARTITION_OFFSET FIXED_PARTITION_OFFSET(NVS_PARTITION)
#define NVS_PARTITION_SIZE FIXED_PARTITION_SIZE(NVS_PARTITION)
#define NVS_PARTITION DT_CHOSEN(infuse_kv_partition)
#define NVS_PARTITION_ID DT_FIXED_PARTITION_ID(NVS_PARTITION)
#define NVS_PARTITION_DEVICE DEVICE_DT_GET(DT_MTD_FROM_FIXED_PARTITION(NVS_PARTITION))
#define NVS_PARTITION_OFFSET DT_REG_ADDR(NVS_PARTITION)
#define NVS_PARTITION_SIZE DT_REG_SIZE(NVS_PARTITION)

LOG_MODULE_REGISTER(kv_store, CONFIG_KV_STORE_LOG_LEVEL);

Expand Down
5 changes: 5 additions & 0 deletions tests/net/auto_sntp/boards/native_sim.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};
};
9 changes: 9 additions & 0 deletions tests/subsys/epacket/common/boards/mps2_an385.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};

epacket_dummy: epacket_dummy {
compatible = "embeint,epacket-dummy";
};
};
9 changes: 9 additions & 0 deletions tests/subsys/epacket/common/boards/native_sim.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};

epacket_dummy: epacket_dummy {
compatible = "embeint,epacket-dummy";
};
};
9 changes: 9 additions & 0 deletions tests/subsys/epacket/handlers/boards/mps2_an385.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};

epacket_dummy: epacket_dummy {
compatible = "embeint,epacket-dummy";
};
};
9 changes: 9 additions & 0 deletions tests/subsys/epacket/handlers/boards/native_sim.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};

epacket_dummy: epacket_dummy {
compatible = "embeint,epacket-dummy";
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};
};
5 changes: 5 additions & 0 deletions tests/subsys/epacket/interfaces/udp/boards/mps2_an385.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};
};
5 changes: 5 additions & 0 deletions tests/subsys/epacket/keys/boards/mps2_an385.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};
};
5 changes: 5 additions & 0 deletions tests/subsys/kv_store/boards/mps2_an385.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};
};
5 changes: 5 additions & 0 deletions tests/subsys/kv_store/boards/native_sim.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};
};
5 changes: 5 additions & 0 deletions tests/subsys/secure_storage/boards/mps2_an385.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};
};
5 changes: 5 additions & 0 deletions tests/subsys/secure_storage/boards/native_sim.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/ {
chosen {
infuse,kv-partition = &storage_partition;
};
};
1 change: 1 addition & 0 deletions tests/subsys/task_runner/tasks/tdf_logger/prj.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CONFIG_ZTEST=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INFUSE_SDK=y
CONFIG_INFUSE_NRF_MODEM_MONITOR=n
CONFIG_TDF_DATA_LOGGER_SERIAL_DUMMY_BACKEND=y

CONFIG_TASK_RUNNER=y
Expand Down
Loading