Visual Studio Code discovers wrong gnuarmemb folder

I'm using Linux 20.04.  I have been following the manual installation guide for setting up the nRF Connect SDK and also nRF Toolchain

in my .bashrc file: 

export PATH=${HOME}/gn:"$PATH"

in my .zephyrrc 

export GNUARMEMB_TOOLCHAIN_PATH="~/gnuarmemb/gcc-arm-none-eabi-10.3-2021.10"

Then i run source zephyr/ in my ncs folder. 

Then I opened VS Code from WITHIN the same terminal, this way VS Code is able to see these environmental variables. In the Quick Setup page I just set the nRF Connect SDK parameter to my *ncs* folder, and set nRF Connect Toolchain to PATH. This 'Invalid Toolchain Installation' message appears and detects an older version of gnuarmemb  ( the one installed for previous SDK from nordic). 

whereis arm-none-eabi-gcc

If i go to the sample folders, I'm able to build properly using the west tool on terminal using: west build -b nrf9160dk_nrf9160ns --pristine

What else could i do to fix this? 

  • Hi

    The "gnuarmemb" folder usually looks like this:

    My guess is that you unzipped the folder into "gnuarmemb", instead of renaming it.
    I am not sure if this should do anything, but it is worth getting it the same way as the tutorial.

    When installing the nRF Connect extension for VS Code on Ubuntu, I fix the "Invalid Toolchain Installation" by setting:

    export PATH=$PATH:$HOME/gnuarmemb/bin

    in .bashrc.
    This looks like the same as you have done. I also agree with you, using $GNUARMEMB_TOOLCHAIN_PATH is cleaner though.

    The reason why it goes in .bashrc can be seen in ".vscode/extensions/nordic-semiconductor.nrf-connect-2021.11.221/docs/":
    "To get around this issue, the extension will query Bash for its environment on Linux and macOS. This executes the `~/.bashrc` file"

    So the extension should run .bashrc for you, meaning that you do not need to run VS Code from the command line.

    Did this help you fix the problem?

    Sigurd Hellesvik

  • Hi Sigurd,

    i applied your changes but they did not help much. It was always taking by default the old gnuarmemb that i had for previous nordic projects.

    If i delete the folder where that old version was installed, I fix the "Invalid Toolchain Installation" error on VSCode. But  then I'm not able to debug the previous nordic projects in eclipse getting: Error while launching command: arm-none-eabi-gdb --version

    Does eclipse debug not work with the new version from arm-none-eabi-gdb or is it a configuration that i need to set? If i bring back the old arm-none-eabi-gdb version, the debug in eclipse works properly.

  • I will try to install an older version of gcc-arm-none-eabi to replicate myself.

    In the meantime, I also noticed that you are using the 2021 version of the toolchain, while our Manual Installation documentation says:
    "To be able to cross-compile your applications for Arm targets, you must install version 9-2019-q4-major of the GNU Arm Embedded Toolchain."

    Could you try the 2019-q4 toolchain?

    Sigurd Hellesvik

Reply Children