TrivialSolution I believe that there is a APPLICATION_VERSION config variable which then gets populated so NCS can sign binaries correctly.
https://docs.zephyrproject.org/latest/develop/west/sign.html
You can actually see what Nordic does to sign in
nrf/modules/mcuboot/CMakeLists.txt
They use CONFIG_MCUBOOT_IMAGE_VERSION
instead though:
set(sign_cmd
${PYTHON_EXECUTABLE}
${ZEPHYR_MCUBOOT_MODULE_DIR}/scripts/imgtool.py
sign
--key ${mcuboot_key_file}
--header-size $<TARGET_PROPERTY:partition_manager,PM_MCUBOOT_PAD_SIZE>
--align ${CONFIG_MCUBOOT_FLASH_WRITE_BLOCK_SIZE}
--version ${CONFIG_MCUBOOT_IMAGE_VERSION}
--pad-header
)
Which is defined here: /Users/jaredwolff/Git/sigmavista/nrf/modules/mcuboot/Kconfig
config MCUBOOT_IMAGE_VERSION
string "Image version"
default "0.0.0+0"
help
Value to be passed as 'version' argument to 'imgtool.py' when
creating signed image. Note that no semantics are connected to
this variable. It does not provide downgrade prevention, and is only
valuable for debugging purposes. Format: maj.min.rev+build with
latter parts optional.
I did a video on it previously on how I do it.
https://www.youtube.com/watch?v=kRqkIdKOkkg&t=1s