build time with west for zephyr projects : how to re-build without the 'build setup' phase eg when just recompiling C files

I'm building my zephyr project for nRF5340, using west.

However, each time I change my code and re-build to try it, my PC (which is pretty recent) takes around 40-50s just re-doing all the build config stuff, rebuilding the core zephyr bit etc before actually compiling the 1 or 2 C files I changed! This ends up being quite frustrating...

I already tell west the --pristine auto option, which does mean it only re-compiles the C I changed, but how can I get it to not redo all the build config stuff ( as generally I have no changes to CMakefiles, no changes to dts files etc)

thanks!

  • Ok thanks. I've decided to avoid snippets for now so pristine=auto is back to being ok for me.

    (also because the snippet system seems to be too limited - you can only have 1 'user' named snippet in snippets/snippets.yml as far as I can see -> can't have a bunch of snippets like "release", "dev", "hwoption1", "hwoption2", to mix and match on the command line...)

Related