'west flash' rebuilds after successful build when enabling SB_CONFIG_BOOTLOADER_MCUBOOT in sysbuild.conf

I'm running into a bit of an annoying situation every time i run 'west flash --build-dir ./build' in the command line. It rebuilds always after a successful build i set when SB_CONFIG_BOOTLOADER_MCUBOOT=y in sysbuild.conf. The build command i use is `west build --build-dir ./build . --board xiao_nrf54l15/nrf54l15/cpuapp --sysbuild -- -DBOARD_ROOT="/home/$USER/platform-seeedboards/zephyr"` and i'm working in Ubuntu with VSCode. It is just such a waste of time with a project that starts to grow.

I have tried with and without deleting the build folder as well as with and without the `--pristine` option, no difference.

Any idea's what i can do to change this behaviour

Parents Reply
  • Hi,

    So basically what happened is that, this was a known issue in the previous SDK/Zephyr version.

    With sysbuild + multiple images (like MCUboot + app), a CMake step that imports DTS/EDT configuration always rewrote a helper .cmake file. Even when the contents didn’t change, the file’s timestamp changed, so CMake/Ninja thought that an input changed and then starts to rebuild everything again.

    That’s why every west flash looked like a full rebuild.

    So what you can do is, update to the latest Zephyr and nRF Connect SDK versions. This issue has been fixed in the newer versions.

    Or else, you could also implement the changes manually in your current version, as show in the PR (this could be a bit complicated):

    https://github.com/nrfconnect/sdk-zephyr/pull/3287/files 

    -Priyanka

Children
Related