Slot1 partition snippet (slot1-partition)

west build -S slot1-partition [...]

Overview

This snippet changes the chosen flash partition to be the slot1_partition node, this can be used to build for the alternate slot in MCUboot direct-xip or firmware loader modes.

Requirements

Partition mapping correct setup in devicetree, for example:

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

		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x00000000 0x0000C000>;
		};

		slot0_partition: partition@c000 {
			label = "image-0";
			reg = <0x0000C000 0x00076000>;
		};

		slot1_partition: partition@82000 {
			label = "image-1";
			reg = <0x00082000 0x00076000>;
		};

		/*
		 * The flash starting at 0x000f8000 and ending at
		 * 0x000fffff is reserved for use by the application.
		 */

		/*
		 * Storage partition will be used by FCB/LittleFS/NVS
		 * if enabled.
		 */
		storage_partition: partition@f8000 {
			label = "storage";
			reg = <0x000f8000 0x00008000>;
		};
	};
};