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:
committed by
Fabio Baltieri
parent
46d8f1baa9
commit
fddcf70d57
24
snippets/slot1-partition/README.rst
Normal file
24
snippets/slot1-partition/README.rst
Normal 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-
|
||||
5
snippets/slot1-partition/slot1-partition.overlay
Normal file
5
snippets/slot1-partition/slot1-partition.overlay
Normal file
@@ -0,0 +1,5 @@
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,code-partition = &slot1_partition;
|
||||
};
|
||||
};
|
||||
3
snippets/slot1-partition/snippet.yml
Normal file
3
snippets/slot1-partition/snippet.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
name: slot1-partition
|
||||
append:
|
||||
EXTRA_DTC_OVERLAY_FILE: slot1-partition.overlay
|
||||
Reference in New Issue
Block a user