Image versions
Each release of an application must come with a specific version. The version can have the form of a single number. Alternatively, it can be based on a more advanced versioning scheme. For example, the semantic versioning scheme uses three numbers to denote major, minor, and patch versions, respectively.
The choice of the versioning scheme depends on the selected bootloader and the configuration of the bootloader, including Downgrade protection. The nRF Connect SDK build system can automatically handle building of the bootloader together with the application. The build system can also sign the application images and provide versioning information for the images.
See the following sections for details related to application versioning for bootloaders supported in the nRF Connect SDK.
Configuring image version with nRF Secure Immutable Bootloader
You can set the image version for your application using the CONFIG_FW_INFO_FIRMWARE_VERSION
Kconfig option.
This option can refer to two different things:
If NSIB directly boots your application image, the Kconfig option denotes the application image version.
If NSIB boots a secondary-stage bootloader, the Kconfig option denotes the version of the secondary-stage bootloader. In such case, the application is booted by the secondary-state bootloader and the application image version is configured using the versioning scheme of the secondary-stage bootloader. For example, if you opted for Adding MCUboot as an upgradable bootloader, the application image versioning configuration is described in Configuring image version with MCUboot.
Configuring image version with MCUboot
To assign a semantic version number to your application when you have opted for booting application directly by the MCUboot bootloader (that is, if you have opted for either Adding MCUboot as an immutable bootloader or Adding MCUboot as an upgradable bootloader), it is recommended to use the VERSION
file that contains the version information for the application image.
Using a VERSION
file allows you to independently configure the version value for each build instance of the application.
See Zephyr’s Application version management page for more information.
Alternatively, you can also add the version string to the CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION
Kconfig option for the application:
CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION="0.1.2+3"
See the Semantic versioning webpage or Image tool for details on version syntax.
Read the MCUboot output build files page for the list of all the FOTA upgrade files that are automatically generated when using MCUboot.