Sudden Build Errors in Visual Studio Code

Hello,

Up until today I had been developing fine with visual studio code, installed via Toolchain Manager. Then, I clicked "Pristine Build" for the first time in a few days. All of a sudden the build failed and now nothing requiring MCUboot will build properly. 

The error I'm seeing is this, when the build gets to the stage of building McuBoot:

/opt/nordic/ncs/v1.8.0/zephyr/scripts/kconfig/kconfig.py: /opt/nordic/ncs/v1.8.0/bootloader/mcuboot/boot/zephyr/Kconfig:11: '/modules/mcuboot/boot/zephyr/Kconfig' not found (in 'source "$(ZEPHYR_NRF_MODULE_DIR)/modules/mcuboot/boot/zephyr/Kconfig"'). Check that environment variables are set correctly (e.g. $srctree, which is set to '/opt/nordic/ncs/v1.8.0/zephyr'). Also note that unset environment variables expand to the empty string.

 

I've tried: 

Uninstalling and re-installing nRF Connect SDK v1.8.0 from the Toolchain manager

Uninstalling and reinstalling Visual Studio code, and then all of its required plugins via Toolchain Manager.

Building a default project that utilizes Mcuboot, that build also fails in the same way that mine does.

An additional thing of note is that when I click "Open VS Code" from within toolchain manager, it will never actually open VS Code. If code isn't installed or is missing plugins, then it will suggest I install them, but then it will just sit on the "Checking iv VS Code and dependencies are installed" screen indefinitely, never doing anything after that.

I am on an M1 Mac, and I am using all Intel versions of software, as suggested. 

Again, everything was working fine yesterday. I have no idea what could have caused this. I hope you guys will have some ideas!

Thanks

  • Hi,

    Could you please try to reproduce your build error by running "west build" from the command line and check the status of the west manifest as described in the documentation?

    Best regards,
    Dejan

  • Hello, 

    Manually building with "west build" I get the same error as in my original post.

    Running "west manifest --validate" returns nothing.

    I am 90% sure the problem is that I am unable to get Toolchain Manager to open up the Intel version of Visual Studio Code. 

    I can recreate the problem by installing the M1 version of VS code and launching it without Toolchain manager. I can then fix the problem by launching the M1 version of VS code with Toolchain manager (As for some reason it will launch that version.) 

    However, Toolchain manager simply will never launch the Intel Version of VS Code. It just sits there spinning saying "Checking if VS Code and Dependencies are installed"

  • Hi,

    I have asked internally and I will come back to you with more information that could help you in solving your problem.

    Best regards,
    Dejan

  • As an update, I have acquired an entirely new machine. A fresh install of Connect for Desktop/Toolchain manager and VS Code Intel edition still results in Toolchain manager endlessly sitting and "checking its VS Code and dependencies are installed".

  • This is also happening to me.  I have an M1 Mac running Big Sur and the latest VSCode for Intel.  

    I also get the "Checking if VS Code and dependencies are installed" from Toolchain Manager. 

    I also get the following build error when trying to build the blue_dfu_peripheral_lbs example.  

    Best,

    Steve

    Parsing /opt/nordic/ncs/v1.8.0/bootloader/mcuboot/boot/zephyr/Kconfig
    /opt/nordic/ncs/v1.8.0/zephyr/scripts/kconfig/kconfig.py: /opt/nordic/ncs/v1.8.0/bootloader/mcuboot/boot/zephyr/Kconfig:11: '/modules/mcuboot/boot/zephyr/Kconfig' not found (in 'source "$(ZEPHYR_NRF_MODULE_DIR)/modules/mcuboot/boot/zephyr/Kconfig"'). Check that environment variables are set correctly (e.g. $srctree, which is set to '/opt/nordic/ncs/v1.8.0/zephyr'). Also note that unset environment variables expand to the empty string.
    CMake Error at /opt/nordic/ncs/v1.8.0/zephyr/cmake/kconfig.cmake:270 (message):
    command failed with return code: 1
    Call Stack (most recent call first):
    /opt/nordic/ncs/v1.8.0/zephyr/cmake/app/boilerplate.cmake:546 (include)
    /opt/nordic/ncs/v1.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    /opt/nordic/ncs/v1.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
    /Users/Steve/Projects/ble_dfu_peripheral_lbs/build/CMakeLists.txt:44 (find_package)

Related