CMakePresets.json, Build-Configs. Project Settings

As a life-long embedded software engineer I'm used two or three dozen of different setups, SDKs, IDEs - but all had in common I can copy or clone a project, open, build and flash the hardware with only one or to clicks and the result is always the same working board.
Now with the VSCode based nRF connect SDK 3.0.1 I'm failing to find the official way to have exactly that: I have a fully working local installation, I can click on "pristine build", "Flash" and all works fine. But I cannot find a way to commit all local state so another person can just clone, build and flash it easily.
Looks like build_configs (build... dirs) are the way to go - but they contain all the build artefacts and are .git-ignored by default. The docs say I could just save a working build-config by saving it as a preset - which generates a CMakePresets.json. But I cannot find any standard way in VSCode to is this file and create a new build-config the the exact same settings. In older versions there seemed to be a "load CMakePresets" in the top part of the "create new build config" GUI - but that is gone. CTRL-SHFT-P only shows "nRF connect: preset save", nithing else related to presets.

So how do you guys want your developers to preserve, version control, and restore IDE projects in 2025?

Thanks a lot!

Parents
  • Hello,

    In general, I try to avoid storing things in the build folder, and I regularly delete all my build folders (when testing a lot of customer samples, the amount of build folders grows quite fast, and also the disk usage on my computer). 

    I must admit that I don't typically use the GUI tools, such as nRF Kconfig GUI or Menuconfig. I assume you are using the nRF Kconfig GUI, since you mention things being stored in the build folder:

    However, if you instead select "Save to File", and specify to save it to prj.conf in the popup, then these changes will be stored in the prj.conf file, outside your build folder. Hence, if you just zip and transfer your application folder to a colleague (without a build folder), they should be able to just create their own build configuration, where all they specify is what NCS version they are using, and what board they are building for, and they should be able to build and flash, and have it behave the same way as it did on your computer. 

    Best regards,

    Edvin

  • Thanks Edvin for sharing your workflow, will give it a try. That said - there definitely should be an easy way to fully save and restore a project with ALL settings and with relative paths - like all other IDEs do and did. Industry standard is that I can create multiple configs which combine baords, optimisations etc called target, all that stuff is saved and restored in the GUI, I can build one or all targets, flash and debug. I can easily version controll a project with all those settings, compare, roll-back changes etc. This seems to be missing or gone in nRF connect VScode in 2025.

Reply
  • Thanks Edvin for sharing your workflow, will give it a try. That said - there definitely should be an easy way to fully save and restore a project with ALL settings and with relative paths - like all other IDEs do and did. Industry standard is that I can create multiple configs which combine baords, optimisations etc called target, all that stuff is saved and restored in the GUI, I can build one or all targets, flash and debug. I can easily version controll a project with all those settings, compare, roll-back changes etc. This seems to be missing or gone in nRF connect VScode in 2025.

Children
No Data
Related