diff --git a/applications/matter_bridge/VERSION b/applications/matter_bridge/VERSION new file mode 100644 index 000000000000..5faa2880cf1d --- /dev/null +++ b/applications/matter_bridge/VERSION @@ -0,0 +1,5 @@ +VERSION_MAJOR = 2 +VERSION_MINOR = 5 +PATCHLEVEL = 99 +VERSION_TWEAK = 0 +EXTRAVERSION = diff --git a/applications/matter_weather_station/VERSION b/applications/matter_weather_station/VERSION index 956d85eaac47..5faa2880cf1d 100644 --- a/applications/matter_weather_station/VERSION +++ b/applications/matter_weather_station/VERSION @@ -1,5 +1,5 @@ VERSION_MAJOR = 2 VERSION_MINOR = 5 -PATCHLEVEL = 0 +PATCHLEVEL = 99 VERSION_TWEAK = 0 EXTRAVERSION = diff --git a/doc/nrf/protocols/matter/end_product/index.rst b/doc/nrf/protocols/matter/end_product/index.rst index bd8eb0b67a9a..35c90bcb9bec 100644 --- a/doc/nrf/protocols/matter/end_product/index.rst +++ b/doc/nrf/protocols/matter/end_product/index.rst @@ -34,4 +34,5 @@ Finally, we discuss topics related to Matter certification (:ref:`ug_matter_devi bootloader security configuring_cd + versioning last_fabric_removal_delegate diff --git a/doc/nrf/protocols/matter/end_product/versioning.rst b/doc/nrf/protocols/matter/end_product/versioning.rst new file mode 100644 index 000000000000..dbef81b9a71a --- /dev/null +++ b/doc/nrf/protocols/matter/end_product/versioning.rst @@ -0,0 +1,100 @@ +.. _ug_versioning_in_matter: + +Maintaining firmware version +############################ + +.. contents:: + :local: + :depth: 2 + +To effectively deploy a Matter product, it is essential to implement application version management. +This versioning is crucial for managing firmware upgrades on devices. +It is also displayed within ecosystem applications, as provided by the Basic Information cluster. + +There are two primary approaches for maintaining versioning: + +* Utilizing a :file:`VERSION` file as detailed on the :ref:`app-version-details` page of the Zephyr Project documentation. + This method involves defining the version information in a specific file format. + +* Implementing dedicated Kconfig configurations. + This approach uses Kconfig system configurations to set and manage the versioning details. + +Choose the approach that best aligns with your project requirements and infrastructure. + +.. note:: + These approaches should not be used simultaneously. + +Using :file:`VERSION` file +************************** + +To implement versioning based on a :file:`VERSION` file, you must create a file named :file:`VERSION` within the application directory and ensure it contains the appropriate content: + +.. code-block:: console + + VERSION_MAJOR = + VERSION_MINOR = + PATCHLEVEL = + VERSION_TWEAK = + +.. note:: + You must assign a value to at least one of the variables. + If not, the :file:`VERSION` file will cause error. + +For example: + +.. code-block:: console + + VERSION_MAJOR = 2 + VERSION_MINOR = 5 + PATCHLEVEL = 99 + VERSION_TWEAK = 0 + +A :file:`VERSION` file is responsible for assigning values in the following format for: + +* MCUboot version: ``MAJOR . MINOR . PATCHLEVEL + TWEAK``. + The above example would be formatted as ``2 . 5 . 99 + 0``. +* Matter OTA: in the 32-bit integer where each variable is 8 bits long. + The above example would be formatted as ``0x02056300``. + +Using KConfig options +********************* + +Depending on how you transfer the updated images to the device, you need to use different Kconfig options. + +.. _ug_matter_dfu_ota: + +Device Firmware Upgrade over Matter versioning +============================================== + +When using DFU over Matter, you must edit the :file:`prj.conf` file in the application directory. +Add the following Kconfig options to change the version: + +* :kconfig:option:`CONFIG_CHIP_DEVICE_SOFTWARE_VERSION` to set to the version number. +* :kconfig:option:`CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING` to set the version string. + +Additionally, since Nordic chips use MCUboot Image Tool, you need to also edit the :kconfig:option:`CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION` Kconfig option, with a value in the following format: ``"MAJOR . MINOR . PATCHLEVEL . TWEAK"``. + +For example: + +.. code-block:: console + + CONFIG_CHIP_DEVICE_SOFTWARE_VERSION=33907456 + CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING="2.5.99+0" + CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION="2.5.99+0" + +Where ``33907456`` is 0x02056300, the hexadecimal versioning of 2.5.99.0. + +.. _ug_matter_dfu_smp: + +Device Firmware Upgrade over Bluetooth LE versioning +==================================================== + +For DFU over Bluetooth LE, you need to edit the :kconfig:option:`CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION` Kconfig option in the :file:`prj.conf` file in the application directory. +Set its value in the following format: ``"MAJOR . MINOR . PATCHLEVEL + TWEAK"``. + +.. _ug_matter_dfu_performing: + +Performing Device Firmware Upgrade +********************************** + +After properly configuring the application version, you can perform device firmware upgrade as explained in :doc:`matter:nrfconnect_examples_software_update`. diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst index 586fee57ec21..463dac823ddc 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst @@ -105,6 +105,8 @@ Matter * A Kconfig option for disabling or enabling :ref:`ug_matter_configuring_read_client`. * Support for PSA Crypto API for devices that use Matter over Thread. It is enabled by default and can be disabled by setting the :kconfig:option:`CONFIG_CHIP_CRYPTO_PSA` Kconfig option to ``n``. + * :file:`VERSION` file implementation to manage versioning for DFU over SMP as well as also Matter OTA. + Backward compatibility is maintained for users who use the :file:`prj.conf` file for versioning. * Migration of the Device Attestation Certificate (DAC) private key from the factory data set to the PSA ITS secure storage. The DAC private key can be removed from the factory data set after the migration. diff --git a/samples/matter/light_bulb/VERSION b/samples/matter/light_bulb/VERSION new file mode 100644 index 000000000000..5faa2880cf1d --- /dev/null +++ b/samples/matter/light_bulb/VERSION @@ -0,0 +1,5 @@ +VERSION_MAJOR = 2 +VERSION_MINOR = 5 +PATCHLEVEL = 99 +VERSION_TWEAK = 0 +EXTRAVERSION = diff --git a/samples/matter/light_switch/VERSION b/samples/matter/light_switch/VERSION new file mode 100644 index 000000000000..5faa2880cf1d --- /dev/null +++ b/samples/matter/light_switch/VERSION @@ -0,0 +1,5 @@ +VERSION_MAJOR = 2 +VERSION_MINOR = 5 +PATCHLEVEL = 99 +VERSION_TWEAK = 0 +EXTRAVERSION = diff --git a/samples/matter/lock/VERSION b/samples/matter/lock/VERSION new file mode 100644 index 000000000000..5faa2880cf1d --- /dev/null +++ b/samples/matter/lock/VERSION @@ -0,0 +1,5 @@ +VERSION_MAJOR = 2 +VERSION_MINOR = 5 +PATCHLEVEL = 99 +VERSION_TWEAK = 0 +EXTRAVERSION = diff --git a/samples/matter/template/VERSION b/samples/matter/template/VERSION new file mode 100644 index 000000000000..5faa2880cf1d --- /dev/null +++ b/samples/matter/template/VERSION @@ -0,0 +1,5 @@ +VERSION_MAJOR = 2 +VERSION_MINOR = 5 +PATCHLEVEL = 99 +VERSION_TWEAK = 0 +EXTRAVERSION = diff --git a/samples/matter/thermostat/VERSION b/samples/matter/thermostat/VERSION new file mode 100644 index 000000000000..5faa2880cf1d --- /dev/null +++ b/samples/matter/thermostat/VERSION @@ -0,0 +1,5 @@ +VERSION_MAJOR = 2 +VERSION_MINOR = 5 +PATCHLEVEL = 99 +VERSION_TWEAK = 0 +EXTRAVERSION = diff --git a/samples/matter/window_covering/VERSION b/samples/matter/window_covering/VERSION new file mode 100644 index 000000000000..5faa2880cf1d --- /dev/null +++ b/samples/matter/window_covering/VERSION @@ -0,0 +1,5 @@ +VERSION_MAJOR = 2 +VERSION_MINOR = 5 +PATCHLEVEL = 99 +VERSION_TWEAK = 0 +EXTRAVERSION =