Building/Debugging with Zephyr SDK Toolchain in nRF Connect VS Code (Linux)

Hello,

I've successfully setup a development environment for nRF Connect and Zephyr on windows (VS Code extension) where I can build, debug and flash code to my board, and now I'm attempting to do the same in a Linux environment running on a virtual machine.  Below I will explain in detail what I've done so far, but here I'll just state that my main goal is to use nRF Connect VS Code as my development environment, but use the currently installed Zephyr SDK toolchain (installed using instruction in latest Zephyr documentation) as is without having to install the nRF SDK and gnuarmemb toolchain.  Is there a way to to tell nRF connect that my toolchain is located in the Zephyr SDK so I can do this?  Just seems wasteful to have to install two identical toolchains when I can already build, flash and debug from a terminal.

More Details:

I followed documentation (Zephyr Getting Started) to get the Zephyr SDK and required toolchains installed, and was successful at building, debugging and flashing code from the command line.  Now I am trying to move away from the command line and setup nRF Connect in VS Code to use the Zephyr SDK toolchains.  I started following the "installing manually" Nordic Semi documentation on this process, but I'm getting a little confused.  In the documentation there is a paragraph:

"If you already have your system set up to work with Zephyr OS based on Zephyr’s Getting Started Guide, you already have some of the requirements for the nRF Connect SDK installed. The only requirement not covered by the installation steps in Zephyr is the GN tool. This tool is needed only for Matter (Project CHIP) applications. You can also skip the Install the GNU Arm Embedded Toolchain section."  

This leads me to believe I can use the existing Zephyr ARM toolchain without installing another.  So after installing the nRF Connect VS Code extension I tried making a new application (I chose to use the Zephy SDK and PATH as toolchain shown in figure below) and then made a build configuration (figure below).  The project started building and then threw the following errors:

 

Building CLARI
west build --build-dir /home/parker/Documents/GitHub/Software_Development/Applications/CLARI/build /home/parker/Documents/GitHub/Software_Development/Applications/CLARI

-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): /home/parker/zephyrproject/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/parker/Documents/GitHub/Software_Development/Applications/CLARI
-- Zephyr version: 2.7.99 (/home/parker/zephyrproject/zephyr), build: v2.7.99-1181-g3c450b103e83
-- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
-- Board: nrf52_clari
-- Cache files will be written to: /home/parker/.cache/zephyr
-- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Configuring incomplete, errors occurred!
CMake Error at /home/parker/zephyrproject/zephyr/cmake/extensions.cmake:2014 (message):
  Assertion failed: GNUARMEMB_TOOLCHAIN_PATH is not set
Call Stack (most recent call first):
  /home/parker/zephyrproject/zephyr/cmake/toolchain/gnuarmemb/generic.cmake:13 (assert)
  /home/parker/zephyrproject/zephyr/cmake/generic_toolchain.cmake:36 (include)
  /home/parker/zephyrproject/zephyr/cmake/app/boilerplate.cmake:540 (include)
  /home/parker/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /home/parker/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
  /home/parker/Documents/GitHub/Software_Development/Applications/CLARI/build/CMakeLists.txt:4 (find_package)


FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/parker/Documents/GitHub/Software_Development/Applications/CLARI/build -S/home/parker/Documents/GitHub/Software_Development/Applications/CLARI -GNinja

So based on my limited understanding, I think I can somehow change a configuration in nRF Connect to point to the existing Zephyr SDK toolchain for ARM and I should be able to build, debug and flash code from VS Code without installing a separate nRF SDK...let me know if this workflow is possible.

OS:  Ubuntu 20.04 LTS

Zephyr SDK:  Zephyr 2.7.99

VS Code:  1.6.2.0

Cheers,

Parker

Parents Reply Children
No Data
Related