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

Parents
  • I got exactly the same error message '/modules/mcuboot/boot/zephyr/Kconfig' not found and I managed to solve this. My case was interference of pyenv.

    To identify the problem, carefully read the build output and find if there's a line like:

    Found Python3: /Users/user/.pyenv/shims/python3.10

    Specifying Python root via an additional cmake argument didn't work with dependencies like mcuboot. I had to remove pyenv path before launching VS Code. I implemented it in a simple shell function:

    code-without-pyenv () {
        remove="$HOME/.pyenv/shims:";
        PATH=$(echo $PATH | sed "s+$remove++g") code
    }

    I hope this helps someone who arrived here ;)

  • Hi,

    Thank you for sharing your solution.

    Best regards,
    Dejan

Reply Children
No Data
Related