VS Code always asks for a Pristine Build with NCS v1.9.1

I have a project using nRF Connect SDK v1.9.1 and recently started having the issue that when I build it in VS Code with the plugin it always asks me to do a Pristine Build, even though no changes have been made. The problem started in the last 2-3 weeks so I can only attribute it to an upgrade of the VS Code plugin.

In addition it does not happen with other projects that I have using later versions of the SDK, eg. v2.4.2 or v2.6.2, only with v1.9.1

Attached is the diagnotstics file I got from VS Code

Thank you

nrf-connect-support-20241115122441.zip

Parents Reply Children
  • "Me too...."

    I have been using 2024.11.75 successfully for several days now, but today things broke; no matter what I do I am now stuck with this:

    Note that 2024.11.75 WAS working perfectly well for me, with v2.8.0.

    The only thing I can think of is that today I decided to clean out a bunch of old SDKs and toolchains.  Not sure if that could have triggered anything, or might be a helpful clue to your developers?

    Reverting to v2024.9.87 does NOT fix things for me.  I need to go all the way back to v2024.7.31 (and disable nRF DeviceTree) to get something I can work with (I can live without the devicetree editor.... but can't live without BUILD and DEBUG!):

  • Hi Vidar,

    I tried with the blinky sample in SDK v1.9.1 and you are right I am not getting the issue. It only seems to happen with our project, although that was working ok too with previous versions of the extension.

    What conditions does it check to decide that the config is stale and a pristine build is needed?

  • Hi,

    Thanks for the update. Do you have multiple projects using different SDK/Toolchains added in your "Applications" view? I got some feedback from our VS code team on this:

    application sources are guaranteed to be incompatible between 1.x and 2.x SDKs, simply because zephyr.h is not where it was. If you'd try to start from a blinky copied from 1.x that cannot be built with 2.x. 

    With the latest changes (2024.11.75) we aim to use the SDK and toolchain that created the build in the first place, that's why these versions are displayed in the details and actions view, so when the user switches between builds the SDK and toolchain changes with them

    Pristine build is a tricky one, because that "removes" the build so currently that is the only action that uses the "active" SDK and toolchain. So before the user tries to perform a pristine build, he needs to ensure the "active" indicated in the welcome panel satisfies the application source. Otherwise the build will fail and will end up where it started.

    We are going to change this workflow in the upcoming release where there will be no more "active" SDK and toolchain. The only way the user can change it will be the Add/Edit Build Configuration page. But that's an upcoming feature.

  • No, there is only one project using SDK v1.9.1 in the workspace. I do have multiple versions of the SDK installed, but they are used for different projects. I have made sure that v1.9.1 is the selected version under 'Manage Toolchains' and 'Manage SDKs' in the Welcome view.

    The build completes successfully but then I only get the Add Build Configuration option, although there is a build configuration. If I close and reopen the workspace then I get only the Pristine Build option

    In addition the project that gives the issue with SDK v1.9.1 has been ported to SDK v2.6.2 and we do not get the pristine build issue there, it only happens with v1.9.1

  • Thank you for confirming. I managed to reproduce the issue now in SDK v1.9.1 by including a child-image (MCUBoot) in the hello world sample. The team is currently investigating the issue.

Related