NRF Connect Extension: Build Configuration CACHED CONF and extra Cmake args

Hi,

I added build a conf to my project which has a prj.conf and select board.  But the extension overwrites my configs with cache and extra cmake flags, which i dont want.

How can I disable auto configuration to prevent overwritings my configs?

Parents Reply Children
  • Hi,

    I have not been able to reproduce this. Can you share wich nRF Connect SDK and which versino of the nRF Connect for VS Code plution you are using, along with exact steps on how to reproduce?

  • I did a little testing, and in the process the nRF Connect extension was reloaded and updated. It seems the prj.conf is at least refreshed if there's changes in the file, could be that my problem was elsewhere as I can't reproduce it.
    Anyhow, the extensions still changes the "Configuration" to the "Use CACHED_CONF_FILE argument", though it might not be a problem in this case as the argument value points to the project prj.conf.

    Visual Studio Code
    Version: 1.89.1
    Commit:
    dc96b837cf6bb4af9cd736aa3af08cf8279f7685
    Date: 2024-05-07T05:16:23.416Z (3 wks ago)
    Electron: 28.2.8
    ElectronBuildId: 27744544
    Chromium: 120.0.6099.291
    Node.js: 18.18.2
    V8: 12.0.267.19-electron.0
    OS: Linux x64 5.15.0-89-generic (Ubuntu 22.04)
    
    nRF Connect for VS Code
    V2024.3.25
    SDK & Toolchain 2.6.1

    Steps to reproduce

    1. Create a new application (copy a sample: serial_lte_modem)
    2. Add new build configuration
      1. nrf9161dk_nrf9161_ns
      2. Set Configuration to prj.conf
      3. Press Build Configuration
    3. The project should build successfully.
    4. Editing the Build Configuration shows the Configuration dropdown now has a preset of "Use CACHED_CONF_FILE argument".
      1. The value of the "Extra CMake arguments now include:

    -DBOARD_ROOT="/home/jyri/nrf_ws/serial_lte_modem"
    -Dmcuboot_OVERLAY_CONFIG="/home/jyri/ncs/v2.6.1/nrf/modules/mcuboot/tfm.conf;/home/jyri/ncs/v2.6.1/nrf/modules/mcuboot/fih_low_enable.conf;/home/jyri/ncs/v2.6.1/nrf/subsys/partition_manager/partition_manager_enabled.conf;/home/jyri/nrf_ws/serial_lte_modem/child_image/mcuboot.conf"
    -DCACHED_CONF_FILE="/home/jyri/nrf_ws/serial_lte_modem/prj.conf"


    It seems this is working as intended, it's just that in the past (like a year or more back) I don't recall the extension adding those arguments, at least they weren't displayed while editing the build configuration

  • Hi,

    Thank you for the detailed description. I see the same now. This will be fixed in the next release of the extension and is also fixed in the latest pre-release version (so you can switch to that if you want, but note that the pre-release version may have other issues).

  • I think it's okay, though I didn't find a detailed description on how the CMake caching works.
    At least while using prj.conf (and possible other Kconfig fragments) it seems that the actual build process works nicely and is consistent as well.

Related