Retrieve MCUBoot version from main application

Hi,

I'm trying to retrieve the MCUBoot version inside my application (from the VERSION file).

In the Zephyr documentation (docs.zephyrproject.org/.../index.html), I found that I can access app_version.h (located in /app/build/app/zephyr/include/generated/app_version.h).

A similar file exists in the MCUBoot build folder (/app/build/mcuboot/zephyr/include/generated/app_version.h).

I'm facing two problems:
1) I can't find a way to include the MCUBoot app_version.h file in my code.
2) Assuming I can include it, it uses the same macro names as the application. In my code, I need to use both the application version and the MCUBoot version. How can I modify the macro names generated for MCUBoot to avoid conflicts?

thanks

Parents Reply
  • Thanks,

    I tried working with this, but the version (from byte 20) is always 0.

    I tested it with three different versions (changing the VERSION file from 2.1.0 to 2.2.0 and 2.3.0), but none of these versions appeared in the hex file.

    Next, I checked the zip file generated during the build process, and the manifest file showed the following values: "version_MCUBOOT": "0.0.0+0" for both s0 and s1.

    Does this mean I cannot retrieve the version of MCUBoot using this method?

Children
Related