Skip to content

Commit bcf78f2

Browse files
Glauber Maroto Ferreiracfriedt
authored andcommitted
soc: riscv: esp32c3: nvs: add NVS support using fixed partitions
add NVS support to esp32c3 using fixed partitions defined on DT Signed-off-by: Glauber Maroto Ferreira <[email protected]>
1 parent 2773984 commit bcf78f2

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

boards/riscv/esp32c3_devkitm/esp32c3_devkitm.dts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,17 @@
4444
&gpio0 {
4545
status = "okay";
4646
};
47+
48+
&flash0 {
49+
status = "okay";
50+
partitions {
51+
compatible = "fixed-partitions";
52+
#address-cells = <1>;
53+
#size-cells = <1>;
54+
55+
storage_partition: partition@9000 {
56+
label = "storage";
57+
reg = <0x00009000 0x00006000>;
58+
};
59+
};
60+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_HEAP_MEM_POOL_SIZE=256
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
CONFIG_HEAP_MEM_POOL_SIZE=256
2+
CONFIG_NVS=y
3+
CONFIG_SETTINGS_NVS=y
4+
CONFIG_MPU_ALLOW_FLASH_WRITE=y

0 commit comments

Comments
 (0)