nRF Connect for VSCode build preset values ignore

it seems like the build preset values in CMakePreset.json are being ignored when creating a new build configuration.

I have the following CMakePresets.json file located in my application directory

{
  "version": 2,
  "cmakeMinimumRequired": {
    "major": 3,
    "minor": 20
  },
  "configurePresets": [
    {
      "name": "build_5340dk",
      "displayName": "Build for NRF5340 DK NRF5340 application MCU Non Secure",
      "generator": "Ninja",
      "binaryDir": "${sourceDir}/build_5340dk",
      "cacheVariables": {
        "NCS_TOOLCHAIN_VERSION": "NONE",
        "BOARD": "nrf5340dk_nrf5340_cpuapp_ns",
        "CONF_FILE": "$env{ZEPHYR_BASE}/../app/my_app/prj.conf"
      }
    }
  ]
}

When attempting to use the preset to build a configuration the build directory and configuration file values are ignored as seen below:


 
Is there anyway to get those values to auto-populate in the gui? Thanks.
Parents
  • Hi again,

    In my own testing I found that the "configuration" field does get populated, as long as you actually select the CMakePreset from the dropdown menu. Could you confirm this? The UX for this is not ideal, since the drop-down states "pre-fill from preset" both before and after selecting your preset.

    The Build directory name is indeed ignored, according to the developers. I've let them know that there is interest in having this value restored.

    Best regards,

    Raoul

  • Yes, I see the field is populated once you select it in the dropdown. I agree the verbage could be improved. This came up while we were trying to streamline new dev environment setups. Big thanks to the nordic team for putting together the vscode extensions. They go a long way towards making setup a breeze.

Reply Children
Related