Peripheral_uart fails to build after editing build configuration

This is a follow-up to case 327769.

Here is a summary of the original case, with highlights added for the crux of the problem:

Here are the details:

  • OS: Windows 10 (NOTE: I am using Windows 11 and get the same behavior)
  • VSCode 1.89.1 (NOTE: Mine is 1.92.2)
  • nRF Connect SDK v2.6.0 (NOTE: Mine is v2.6.1)
  • nRF Connect for VS Code Extension version - whatever came with nRF Connect for VS Code Extension Pack v2023.11.3, also with the pre-release versio
  • Sample Project: peripheral_uart

Steps to reproduce:

  1. Create an empty directory at C:\XXX\YYY\ZZZ\ (15 character path with client info redacted)
  2. Open this directory in VSCode.
  3. Use nRF Connect plugin to create a new project based on peripheral_uart
  4. Add build configuration, select nrf5340dk_nrf5340_cpuapp as the Board.  Leave all other options at their defaults.
  5. Click blue "Build Configuration" button.  Wait for build to finish.  (Build will be successful).
  6. Click "Edit Build Configuration" on the build configuration that just finished building.
  7. Observe that two Extra CMake arguments were added automatically: -Dhci_ipc_OVERLAY_CONFIG=".;C:/ncs/v2.6.0/nrf/subsys/partition_manager/partition_manager_enabled.conf" -DCACHED_CONF_FILE="c:/XXX/YYY/ZZZ/peripheral_uart/prj.conf"
  8. Change nothing but click "Build Configuration".
  9. Observe that build fails.

The TERMINAL will read:

-- Including generated dts.cmake file: C:/Prj/Way/Rem/peripheral_uart/build_6/hci_ipc/zephyr/dts.cmake
CMake Error at C:/ncs/v2.6.0/zephyr/cmake/modules/kconfig.cmake:290 (message):
  File not found: C:/ncs/v2.6.0/zephyr/samples/bluetooth/hci_ipc/.
Call Stack (most recent call first):
  C:/ncs/v2.6.0/nrf/cmake/modules/kconfig.cmake:29 (include)
  C:/ncs/v2.6.0/zephyr/cmake/modules/zephyr_default.cmake:129 (include)
  C:/ncs/v2.6.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  C:/ncs/v2.6.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:5 (find_package)

The problem is the ".;" prepended to the -Dhci_ipc_OVERLAY_CONFIG string; it leads to the file not found error.

I found two work-arounds:

  1. Delete the entire -Dhci_ipc_OVERLAY_CONFIG definition from Extra CMake Arguments
  2. Edit -Dhci_ipc_OVERLAY_CONFIG to remove the ".;"

Further note: When I changed nRF Connect for VS Code back to the released version (v2024.7.13), I no longer see the problem. My nRF Connect Extension Pack is still at 2023.11.3.

  • Hi Rick

    I'm trying to replicate the issue at my end. 

    As of now I could not see anything while using the pre-release version of the extension 

    If I use the release version I see the extra build arguments gets added. However I do not experience any issue. 

    Just to verify. If you have a blank project you don't see anything. Then you build and it then you might see them? To me it looks like the extension picks up leftover build arguments from the build process which is added normally during the build process. 

    I would expect everything to work if you just remove the extra build arguments as they should not be needed to add manually. I will try to see if I get the system to fail at building.

    Regards

    Runar

  • Hi Runar,

    Correct. When I first add a build configuration to a new peripheral_uart application, I do not see any Extra CMake Arguments. The application builds just fine.

    If I edit the build configuration, the extra CMake arguments are there, including the one with the prepended ".;", which causes the build failure. I replicated these steps just now, and the extra CMake arguments, including the one that causes the failure, are there.

    You are also correct that if I remove the extra arguments, it builds correctly.

    Rick

  • Thank you, I have asked internally if anyone has seen the same issue and know of a fix. I will update as soon as I have something
    Regards
    Runar

Related