Build configuration stale AGAIN (unrecoverable)

This happens quite often, I simply has to create a new build configuration and in worse cases simply a new application and copy all my sourcefiles over to the new project.

This time I have a little info on what actually happened.

I have been working on this project for the last days, without any problem. Everything is latest version SDK, toolchain, VS code etc.

My project is under git control so I can see what is changed!

 - I did a small mistake when modifying the device tree which is in a seperate boards directory and also in git. This caused the application project to not build because of DTS problem.

 - I immediately fixed the problem but when trying to build my application VS Code terminal kept telling me that a build was already active so I could not start a build. I waited, tried to clean the build configuration and other things for 30 minutes. Unable to get out of the state that the system thought there was an active build in progress. 

 - So finally I exited VS Code and restarted.

 - Now it opens with "The build configuration is stale. Run a prestine build". But this is not possible i get the following:

.... <next message>

For some reason it is impossible to get my project back in working condition.

I can see that there is a CMake warning followed by the error that configuration is incomplete!

There are no changes to my code or makefiles for the project.

This must be something in the build directory (that is excluded from git...) and it happens caused by a build error.

I am reporting this in the hope that Nordic some day will look at the unstable environment issue. This is something that happens way too often and I see others writing about it also. This is propably just an example of what can go wrong. In this case I think that making a new build configuration will solve the problem, but it is not nice. I have projects with many "dead" build configurations and I loose development time, every time it happens.

  • I am using nrf Connect 2025.5.152 (but this is very new and I have not seen the problem yet in this one).

    VS code is 1.100.2

  • The problem is trivial to reproduce: Just kill the build process early during initial or pristine build. 

    Result is a build dir thats completely unusable in VS code (and won't even be detected when you restart the IDE).

    Fix is surprisingly difficult to figure out as it requires west command line usage - which a dev normally does not need to touch much. I had trouble finding the button that opens a terminal where "west" is  recognized as a command...

    I recommend adding a chapter in the documentation about this (or adding a link if one exists and I just missed it). 

    Or even better: Add some more error handling to the code that detects and handles build folders. 

  • Hi,

    Turbo J said:

    I recommend adding a chapter in the documentation about this (or adding a link if one exists and I just missed it). 

    Or even better: Add some more error handling to the code that detects and handles build folders. 

    I have forwarded your recommendation internally. For now, only option to recover from situations like this is to delete build folder manually.

    Thomas said:
    I am using nrf Connect 2025.5.152 (but this is very new and I have not seen the problem yet in this one).

    Do I understand correctly that your problem is not present anymore with this version of extension?

    Best regards,
    Dejan

  • As far as I know, the problem is still there.

  • Hi  ,

    dejans said:
    Thomas said:
    I am using nrf Connect 2025.5.152 (but this is very new and I have not seen the problem yet in this one).

    Do I understand correctly that your problem is not present anymore with this version of extension?

    Thomas said:
    As far as I know, the problem is still there.
    I immediately fixed the problem but when trying to build my application VS Code terminal kept telling me that a build was already active so I could not start a build. I waited, tried to clean the build configuration and other things for 30 minutes. Unable to get out of the state that the system thought there was an active build in progress. 

    What exactly did you modify and how did you immediately fix the problem? Can you please describe the problem in more detail? Can you provide exact steps with screenshots so that I can try to reproduce your exact issue?

    Best regards,
    Dejan

Related