V2.9.0 - VERSION file changes are only partly processed by build command.

We're trying to use the VERSION file, to both generate the app_version.h file (so that the application can know its own version numbers), and to update the version which gets put into the MCUBoot headers during signing.  (And which our firmware handling system also uses to know the version of a .bin file)

If one does a pristine build, both app_version.h and the MCUBoot signing process correctly incorporate the information from VERSION

But if one does a normal "west build", then app_version.h is updated, but the although the MCUBoot signing does happen, it uses outdated VERSION information - because CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION has not been updated.

This obviously leaves the application thinking it is one version number but the bootloader thinking it is another.

I am not sure if improving incremental build is really one of the aims of the project, but it would probably be better for it to either update both these versions, or to update neither.

Parents Reply Children
  • I don't find the VS Code stuff reliable enough to do anything with, so we build from the command line using "west build" (either just "west build" for an incremental build, or with --pristine and the various other command line options for a pristine build.

    It's the incremental "west build" which doesn't seem to update the versions properly.   TBH I'm not going to spend any more time on this - we just make sure we do a pristine build after a version number change.

Related