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

  • Hi Raoul,

    I was just at the same point and realized, that the build directory name via the CMakePresets is not set.
    I am using the nRF Connect for VS Code v2023.6.345.

    Do you know if this will be added and if so, when this is gonna be working/released?

    Thank you in advance!

    Best reagrds,
    Pascal

Reply Children
No Data
Related