Skip to content

Commit 0501247

Browse files
committed
doc: migration guide: add Fast Pair partition overlay compatible migration
Added a Google Fast Pair section under "Libraries / Recommended changes" of the v3.4 migration guide that documents the migration of the Fast Pair sample partition overlays from the legacy fixed-partitions compatible string to the new zephyr,mapped-partition compatible string. The new section is anchored as migration_3.4_google_fast_pair so that other parts of the migration guide can reference it. The migration is generic and applies to all Fast Pair samples and board targets, but the section also highlights that it is mandatory on nRF53 Series board targets: after the recent Zephyr SoC devicetree updates that added a ranges translation to the cpunet flash node, the legacy fixed-partitions style makes the linker double-count the flash base address. Without the migration, the network core image is linked outside the valid flash range and nrfutil rejects programming. Ref: NCSDK-38010 Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
1 parent 3bdcdd8 commit 0501247

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

doc/nrf/releases_and_maturity/migration/migration_guide_3.4.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,69 @@ Libraries
146146

147147
This section describes the changes related to libraries.
148148

149+
.. _migration_3.4_google_fast_pair:
150+
151+
Google Fast Pair
152+
----------------
153+
154+
.. toggle::
155+
156+
For applications and samples using the :ref:`bt_fast_pair_readme` library:
157+
158+
* The devicetree (DTS) partition overlays of the Fast Pair samples and Fast Pair-enabled board targets have been migrated from the legacy ``fixed-partitions`` compatible string to the new ``zephyr,mapped-partition`` compatible string introduced in Zephyr.
159+
The new layout matches the output of the Partition Manager-to-DTS helper script (:file:`scripts/pm_to_dts.py`) and aligns the Fast Pair sample overlays with the partition binding convention adopted by the rest of the Zephyr SoC devicetree.
160+
161+
If your application uses a Fast Pair DTS partition overlay derived from earlier |NCS| releases, update each :file:`<board_target>.overlay` file as follows:
162+
163+
* On the ``partitions`` grouping node, replace the ``compatible = "fixed-partitions";`` property with an empty ``ranges;`` property.
164+
* On every child partition node (for example, ``boot_partition``, ``slot0_partition``, ``slot1_partition``, ``bt_fast_pair_partition``, and ``storage_partition``), add the ``compatible = "zephyr,mapped-partition";`` property.
165+
166+
For example, replace the following overlay snippet:
167+
168+
.. code-block:: devicetree
169+
170+
partitions {
171+
compatible = "fixed-partitions";
172+
#address-cells = <1>;
173+
#size-cells = <1>;
174+
175+
slot0_partition: partition@0 {
176+
label = "image-0";
177+
reg = <0x0 DT_SIZE_K(996)>;
178+
};
179+
};
180+
181+
With the following:
182+
183+
.. code-block:: devicetree
184+
185+
partitions {
186+
ranges;
187+
#address-cells = <1>;
188+
#size-cells = <1>;
189+
190+
slot0_partition: partition@0 {
191+
compatible = "zephyr,mapped-partition";
192+
label = "image-0";
193+
reg = <0x0 DT_SIZE_K(996)>;
194+
};
195+
};
196+
197+
Refer to the partition overlays under the :file:`nrf/samples/bluetooth/fast_pair/locator_tag/` and :file:`nrf/samples/bluetooth/fast_pair/input_device/` sample directories for complete examples of the updated layout.
198+
199+
.. important::
200+
This migration is mandatory on nRF53 Series board targets.
201+
Recent Zephyr updates added a ``ranges`` translation to the ``flash1`` SoC node (network core flash), so ``DT_REG_ADDR()`` on partition nodes now returns their bus address rather than their in-flash offset.
202+
With the legacy ``fixed-partitions`` compatible, the Zephyr linker still uses ``CONFIG_FLASH_BASE_ADDRESS + CONFIG_FLASH_LOAD_OFFSET`` to place the network core code partition, which double-counts the ``flash1`` base.
203+
As a result, the network core image is linked at an address outside the valid flash range and ``nrfutil`` rejects programming with the following message:
204+
205+
.. code-block:: console
206+
207+
Device error: Address range 0x02008800..0x020262ac is outside the memory ranges defined for programming through the Network core (Generic)
208+
209+
Switching to ``zephyr,mapped-partition`` makes the linker derive the network core code partition's load address directly from ``DT_REG_ADDR(zephyr_code_partition)``, which yields the correct bus address and avoids the double-counting.
210+
On the application core, where ``flash0`` uses identity ``ranges``, both compatibles produce the same addresses, but updating the overlays is still recommended for consistency.
211+
149212
nRF Cloud library
150213
-----------------
151214

0 commit comments

Comments
 (0)