App version usage in code and configuration

Hi there,

Zephyr has ability for an Application version management. Based on this, I have created a "Version" file, without any file name extension (like .txt).

Now I would like to display the version in the "Device Information Service" defined in my prj.conf like:

CONFIG_BT_DIS_FW_REV_STR=$(APP_VERSION_TWEAK_STRING)

But, this gives me: "Assignment ignored. error: Aborting due to Kconfig warnings".

How can I use the firmware version in the device information service?

Thanks for your answer in advance.

Kind regards,

Patrick

  • Dear Håkon,

    The VERSION file looks like this:

    VERSION_MAJOR = 5
    VERSION_MINOR = 9
    PATCHLEVEL = 8
    VERSION_TWEAK = 7
    EXTRAVERSION = dev

     The folder structure looks like this:

    It seems that the version can be read, as tried to do some DFU's yesterday, where the version was displayed in the Android application as I defined it in the file.

    Kind regards,

    Patrick

  • Dear Patrick,

     

    Try to create a Kconfig file in your project, containing this:

    config BT_DIS_FW_REV_STR
        default "$(APP_VERSION_TWEAK_STRING)" if "$(APP_VERSION_EXTENDED_STRING)" != ""
    
    source "Kconfig.zephyr"

    And see if this configures things as expected now? 

    Please note that any settings in your prj.conf / $board.conf that also sets CONFIG_BT_DIS_FW_REV_STR must be removed.

     

    Kind regards,

    Håkon

Related