Setting BT_DIS_FW_REV_STR from VERSION file

Hi,

Im using the VERSION file for firmware versioning: https://docs.zephyrproject.org/latest/build/version/index.html

I would like to use this to set BT_DIS_FW_REV_STR for the BT DIS service.

What I have tried:

- setting  BT_DIS_FW_REV_STR in project CMakeLists.txt: seems like I first have to run find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) to expose the versioning variables. However this then looks to be too late for setting BT_DIS_FW_REV_STR

- tried accessing the versions from kconfig directly but with no success

Parents
  • Hello,

    Please try to add the Kconfig file included in the .zip attached below to your project source directory.

    0753.Kconfig.zip

    - setting  BT_DIS_FW_REV_STR in project CMakeLists.txt: seems like I first have to run find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) to expose the versioning variables. However this then looks to be too late for setting BT_DIS_FW_REV_STR

    I agree with your observation. This approach would probably have worked if the version information was available prior to calling find_package().

    Best regards,

    Vidar

Reply
  • Hello,

    Please try to add the Kconfig file included in the .zip attached below to your project source directory.

    0753.Kconfig.zip

    - setting  BT_DIS_FW_REV_STR in project CMakeLists.txt: seems like I first have to run find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) to expose the versioning variables. However this then looks to be too late for setting BT_DIS_FW_REV_STR

    I agree with your observation. This approach would probably have worked if the version information was available prior to calling find_package().

    Best regards,

    Vidar

Children
Related