Files needed for nRF Connect SDK to detect builds

Hi,

What files are needed for nRF Connect SDK to detect a "build"? "build" folders are excluded from the Git repository by default, but I'd like to include the build info (minimal files necessary) in my repository. It looked to me like .vscode-nrf-connect.json contains all the info needed, but with only this file nRF Connect SDK does not detect the build - which other files are needed?

Thank You

  • Hello,

    The nRF connect SDK relies on CMake-generated files to identify and manage builds. vscode-nrf-connect.json contains settings related to the build in the context of Visual Studio Code and nRF Connect for VS Code. However, this file alone is not enough without the CMake-generated files. CMakeCache.txt contains all the CMake configuration options and settings for the build. nRF Connect SDK uses it to understand what has been configured and generated for the project.

    Kind Regards,

    Abhijith

  • Hi Abhijith

    Thank-you. The CMakeCache.txt file is not ideal as all the paths are absolute, so won't port if the repository is cloned. Perhaps something to feed back to the devs, I think the .vscode-nrf-connect.json contains all the info needed to set up a new build.

  • Hello,

    You’re right, CMakeCache.txt contains absolute paths, making it non-portable when the repository is cloned to a different location. This is a common issue with CMake files. Could we add a setup script to the repository that automatically runs the CMake generation step (e.g., cmake .. from the build directory) using the configuration from .vscode-nrf-connect.json?

    Kind Regards,

    Abhijith

Related