This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Ubuntu installation of nRF Connect SDK + Visual Studio Code - toolchain question

Hi,

I have made a manual installation of the nRF Connect SDK in order to develop nRF5340 applications on my Ubuntu PC. I have tried, to the best of my ability, to follow the explanations from https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_installing.html

Visual Studio Code was installed according to https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-connect-for-visual-studio-code-preview (although this link mainly explains the Windows case)

GNU Arm EMbedded Toolchain was installed here: ~/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux/gcc-arm-none-eabi-9-2019-q4-major   (*)

When I try to "Create a new application from sample..." I get the message "Invalid toolchain installation" under "nRF Connect Toolchain" input box.

I have tried alternatives like PATH and selecting the link marked (*) above, but without any luck.

I have also set the environmental parameters:

export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export PATH="/home/kg/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux/gcc-arm-none-eabi-9-2019-q4-major/bin/":"$PATH"

in the .zephyrrc file

Could you please help me to find the right way to set the nRF Connect (GNU Arm Embedded) Toolchain in VSC in an Ubuntu system?

Many Thanks!!

Parents
  • Hi Knut,

    I was having the same problem until I added this last line to my .zephyrrc file. It ended up looking like this:

    export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
    export GNUARMEMB_TOOLCHAIN_PATH="/opt/gnuarmemb"
    export PATH="/opt/gnuarmemb/bin":"$PATH"

    After this, I opened a terminal and ran (inside my ncs folder):

    source zephyr/zephyr-env.sh

    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 did not appear anymore.

    Regards,

    Alex

Reply
  • Hi Knut,

    I was having the same problem until I added this last line to my .zephyrrc file. It ended up looking like this:

    export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
    export GNUARMEMB_TOOLCHAIN_PATH="/opt/gnuarmemb"
    export PATH="/opt/gnuarmemb/bin":"$PATH"

    After this, I opened a terminal and ran (inside my ncs folder):

    source zephyr/zephyr-env.sh

    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 did not appear anymore.

    Regards,

    Alex

Children
Related