Unable to use internal flash on sdk 3.02 using custom board file

I am using the zephyr\samples\subsys\nvs example.

By default the program stores data in internal flash in storage_partition.

I would like to create a custom board file for my board. I am using nrf52840dk board. 

However when I create a custom board using the nrfconnect menu on VSCode and using sdk 3.0.2 the program doesn't run at all.

The default dts that is generated once I create the custom board is as follows:

#include <nordic/nrf52840_qiaa.dtsi>
#include "nvs_test_sdk3-pinctrl.dtsi"

/ {
	model = "Nvs Test";
	compatible = "Gearbox,nvs-test-sdk3";

	chosen {
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
		zephyr,code-partition = &slot0_partition;
		zephyr,flash-controller = &flash_controller;
	};
};

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

		        boot_partition: partition@0 {
			            label = "mcuboot";
			            reg = <0x00000000 DT_SIZE_K(48)>;
		        };

		        slot0_partition: partition@c000 {
			            label = "image-0";
			            reg = <0x0000c000 DT_SIZE_K(472)>;
		        };

		        slot1_partition: partition@82000 {
			            label = "image-1";
			            reg = <0x00082000 DT_SIZE_K(472)>;
		        };

		        storage_partition: partition@f8000 {
			            label = "storage";
			            reg = <0x000f8000 DT_SIZE_K(32)>;
		        };
	    };
};

Is there something that I need to enable in my devicetree visual editor inorder for my program to use internal flash using the custom board that i created

  • Hello,

    It seems you have sysbuild enabled. If the sysbuild or mcuboot enabled (Partition Manager enabled) the partition definitions in your DTS are ignored, and the Partition Manager's configuration takes precedence. Then during runtime your application expects partition defined in the DTS, but this is not present at runtime which leads to the issue you mentioned.

    You can use 'no sysbuild' in the command (DT_N_NODELABEL_settings_storage_REG_IDX_0_VAL_SIZE' undeclared)

    or define your partition in pm_static.yml. 

    I can check your build folder both for DK and custom board. Can you please share these with me?

    Regarding the devicetree editor query, there is no specific setting in the Devicetree Visual Editor to enable the internal flash page. 

Related