snippets: Add slot1-partition snippet

Adds a snippet which sets the chosen code partition to
slot1_partition, which can be used with things like MCUboot

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae
2026-01-09 09:57:10 +00:00
committed by Fabio Baltieri
parent 46d8f1baa9
commit fddcf70d57
3 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
.. _snippet-slot1-partition:
Slot1 partition snippet (slot1-partition)
#########################################
.. code-block:: console
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:
.. literalinclude:: ../../dts/vendor/nordic/nrf52840_partition.dtsi
:language: dts
:dedent:
:lines: 15-

View File

@@ -0,0 +1,5 @@
/ {
chosen {
zephyr,code-partition = &slot1_partition;
};
};

View File

@@ -0,0 +1,3 @@
name: slot1-partition
append:
EXTRA_DTC_OVERLAY_FILE: slot1-partition.overlay