Fat FS on Xiao BLE (nRF52840) based board

Good day! I want to use Fat FS to connect to a micro SD Card on the Xiao BLE board. Is it possible to configure the board without the help of the expansion module? The main problem I see is configuring the &flash0 partition. From what I have read, I need to allocate partitions for the Fat FS and the SD Card.

This is what the xiao_ble_common_dtsi looks like on the partitions.

&flash0 {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		sd_partition: partition@0 {
			label = "softdevice";
			reg = <0x00000000 0x00027000>;
		};

		code_partition: partition@27000 {
			label = "code_partition";
			reg = <0x00027000 0x000c5000>;
		};

		/*
		 * The flash starting at 0x000ec000 and ending at
		 * 0x000f3fff is reserved for use by the application.
		 *
		 * Storage partition will be used by FCB/LittleFS/NVS
		 * if enabled.
		 */
		storage_partition: partition@ec000 {
			label = "storage";
			reg = <0x000ec000 0x00008000>;
		};

		boot_partition: partition@f4000 {
			label = "adafruit_boot";
			reg = <0x000f4000 0x0000c000>;
		};
	};
};

Is there any other way to use Fat FS. I am not very knowledge-able in the File Systems code yet. Thank you!

Related