Using the VERSION file

Hi! I am currently working on updating our code to comply with SDK version 2.5.1. When it comes to using the VERSION file i'm getting confused. First of all, why is VERSION_TWEAK or EXTRAVERSION not defined in app_version.h? APPVERSION and APP_VERSION_STRING is constructed differently and APP_BUILD_VERSION why is this an string (unquoted) ? 

From what i'm seeing the resulting CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION is constructed as VERSION_MAJOR.VERSION_MINOR.VERSION_PATCHLEVEL+VERSION_TWEAK but the APP_VERSION_STRING defined in app_version.h is constructed as VERSION_MAJOR.VERSION_MINOR.VERSION_PATCHLEVEL-EXTRAVERSION. Am i missing something here or is this considered as work in progress ? 

Regards 

Anton

Parents
  • Hi Anton,

    I have looked into the VERSION file feature. It was initially a feature that is meant for the versioning and header file generation for the entire Zephyr RTOS rather than an application. It was generalized and expanded for application versioning use in commit 2c757f and 99064c.

    If I understand correctly, the generated content in app_version.h to be just a direct port of version.h, without any specific usage intended yet.

    At the very least, as of NCS 2.5.1, I have confirmed that it doesn't factor into DFU or image management at all. The DFU solution still works based on CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION. If you need access to that value in the current build, you can just access CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION directly. See: Firmware updates — nRF Connect SDK 2.5.1 documentation (nordicsemi.com).

    It is recommended that you don't configure CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION directly. You should keep it unconfigured and use the VERSION file instead; it will defaulted to the value you have found.

    As for the EXTRAVERSION field, my understanding is that it is a remnant from the kernel versioning, and not directly relevant here.

    Hieu

Reply
  • Hi Anton,

    I have looked into the VERSION file feature. It was initially a feature that is meant for the versioning and header file generation for the entire Zephyr RTOS rather than an application. It was generalized and expanded for application versioning use in commit 2c757f and 99064c.

    If I understand correctly, the generated content in app_version.h to be just a direct port of version.h, without any specific usage intended yet.

    At the very least, as of NCS 2.5.1, I have confirmed that it doesn't factor into DFU or image management at all. The DFU solution still works based on CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION. If you need access to that value in the current build, you can just access CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION directly. See: Firmware updates — nRF Connect SDK 2.5.1 documentation (nordicsemi.com).

    It is recommended that you don't configure CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION directly. You should keep it unconfigured and use the VERSION file instead; it will defaulted to the value you have found.

    As for the EXTRAVERSION field, my understanding is that it is a remnant from the kernel versioning, and not directly relevant here.

    Hieu

Children
Related