Hi. I am trying to mount file system to internal flash memory of chip nrf52840 (using SDK v2.2.0). I was looking for sample and I found some: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/zephyr/services/file_system/index.html. But these samples dont show how to mount file system to internal flash memory. Also one of the samples is using shell commands to write or read from memory, I would like to do writing and reading of data by chip (in main function :) ). I would like to write sensor measurement data to files and read these data and so on... But from this samples I cant find out how to do it. I was trying to study documentation on web page which I mentioned here, but I couldn figure it out. My biggest concern is how to specify where to mount file system (flash storage of chip) and also what to add to .conf files or board files (I am using custom made board with NRF52840, I have my custom board defined in SDK). I am novice to programming IoT chips (half year using ESP32, new to NRF), so it would not be possible to provide some simple example of how to mount file system and write (read) data to memory? I will provide you my partition sections:
&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x0 0xc000>;
};
slot0_partition: partition@c000 {
label = "image-0";
reg = <0xc000 0x72000>;
};
slot1_partition: partition@7e000 {
label = "image-1";
reg = <0x7e000 0x72000>;
};
scratch_partition: partition@f0000 {
label = "image-scratch";
reg = <0xf0000 0xa000>;
};
storage_partition: partition@fa000 {
label = "storage";
reg = <0xfa000 0x6000>;
};
};
};
Thanks everyone for your help.