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

Related