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.

Parents
  • Hi

    I'm new to nrfConnect and installed V3.0 on a Linux Mint.I'm struggling with the definition of my custom board and the problem description fits my observations. Sometimes I'm just stuck with my board, sometimes even the build vanishes from Nordic extension view of the project (the build directory still exists but project does not show the build anymore).

    One easy way to demonstrate part of the problem:
    a) create a new application from hello world sample
    b) build it for nrf52840DK - everything is fine
    c) add the following lines to prj.conf (yes, we will get errors, this is important)

    CONFIG_GPIO=y
    CONFIG_I2C=y
    CONFIG_SPI=y
    
    
    CONFIG_USB_DEVICE_STACK=y
    CONFIG_USB_CDC_ACM=y
    CONFIG_USB_CDC_ACM_LOG_LEVEL_INF=n
    CONFIG_USB_DEVICE_LOG_LEVEL_INF=n
    
    
    CONFIG_SERIAL=y
    CONFIG_UART_CONSOLE=n
    CONFIG_USB_UART_CONSOLE=n
    CONFIG_SHELL_BACKEND_SERIAL=n
    CONFIG_LOG_BACKEND=n
    
    
    CONFIG_USB_DEVICE_PRODUCT="Heureka CDC ACM sample"
    CONFIG_USB_DEVICE_PID=0x0001
    

    start a "Pristine Build" and we get the expected FATAL ERROR.
    The point is: the spinning icon left of the build stops.

    start a second "Pristine Build" and we get the expected FATAL ERROR again.
    But this time the icon left of the build keeps spinning.

    I start a third "Pristine Build" and in the terminal I get:
    > Another task is currently building this configuration, closing.

    I'm afraid we might have overlapping issues which make it hard to pinpoint the cause.
    But I guess this phenomenon might be part of the problem.

    I can confirm that using the dialog to edit the build configuration helps a lot as does
    - stop VS code
    - remove build directory
    - restart VS code and create a new build

    hope this helps

    Peter

  • Trying to build on v3.0.1 and having similar issues, Have to close down and setup build from scratch to rebuild...
    looking for a solution...

  • Create a project from scratch based on hello_world.

    Selected nrf9151dk/nrf9151dk as board.

    Build the project.

    Now add a devicetree overlay called error.dts. Put some garbage in the file.

    In the build configuration select Generate and Build and close the view.

    Now you get a build error: 

    -- Configuring incomplete, errors occurred!
    See also "D:/Workspaces/hello_world_5/build/CMakeFiles/CMakeOutput.log".
    FATAL ERROR: command exited with status 1: 'D:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.EXE' -DWEST_PYTHON=D:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe '-Bd:\Workspaces\hello_world_5\build' -GNinja -DBOARD=nrf9151dk/nrf9151/ns -DDTC_OVERLAY_FILE=error.dts -DBOARD_ROOT=d:/nrfboards '-SD:\ncs\v3.0.2\zephyr\share\sysbuild' '-DAPP_DIR:PATH=d:\Workspaces\hello_world_5'

    * The terminal process terminated with exit code: 1.
    * Terminal will be reused by tasks, press any key to close it.

    The build configuration is gone:


    This is of course not how it happens normally, it would be a real board DTS and it would be a real project.

    You are unable to get the build configuration back, and will have to create a new one.

  • Hi,

    Turbo J said:

    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).

    Can you elaborate how build folder is unusable in VS Code? 
    I have tried canceling build process while it was running but the build was detected after restarting VS Code.

    Thomas said:

    Now add a devicetree overlay called error.dts. Put some garbage in the file.

    In the build configuration select Generate and Build and close the view.

    How did you include error.dts in your build when you got build error?

    Best regards,
    Dejan

  • I included an dummy error.dts with garbage in the build setup as extra device tree overlay.

  • Normally the build simply dissapears from the menu (APPLICATIONS). This means you are no longer able to select the build and rebuild the project.

  • Hi,

    Thank you for clarification.

    I have replicated this issue. I have built the project successfully and then I added err.overlay to the build configuration and the build folder indeed disappeared. I have reported this internally. For exact timeline when this is expected to be fixed, you can contact your regional sales manager.

    Best regards,
    Dejan

Reply
  • Hi,

    Thank you for clarification.

    I have replicated this issue. I have built the project successfully and then I added err.overlay to the build configuration and the build folder indeed disappeared. I have reported this internally. For exact timeline when this is expected to be fixed, you can contact your regional sales manager.

    Best regards,
    Dejan

Children
No Data
Related