This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF Connect for VS Code YouTube videos, having problems with Include paths and Kconfig in mac OS

 am following the introductory videos and have done a fresh install of the Toolchain, Segger, VS Connect 3.7.2, nRF Connect SDK v1.8.0 and VS code on macOS 

1. Installation

https://www.youtube.com/watch?v=2cv_jjqk5hg&list=PLx_tBuQ_KSqEt7NK-H7Lu78lT2OijwIMl

2. Create an application

https://www.youtube.com/watch?v=KwJtcPZHV30&list=PLx_tBuQ_KSqEt7NK-H7Lu78lT2OijwIMl&index=2

3. Building an application & Exploring windows

https://www.youtube.com/watch?v=3yi6kuxgdPg&list=PLx_tBuQ_KSqEt7NK-H7Lu78lT2OijwIMl&index=3

The source code shows errors with the paths for the INCLUDE statements:

This is the output from the Terminal window:

> Executing task: nRF Connect: Build blinky/build (active) <

Building blinky

west build --build-dir /Users/alwalker/workspace/blinky/build /Users/alwalker/workspace/blinky --pristine --board nrf5340dk_nrf5340_cpuapp -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS:STRING="y" -DCONFIG_DEBUG_THREAD_INFO:STRING="y" -DCONF_FILE:STRING="/Users/alwalker/workspace/blinky/prj.conf"

-- west build: generating a build system

Including boilerplate (Zephyr base): /opt/nordic/ncs/v1.8.0/zephyr/cmake/app/boilerplate.cmake

-- Application: /Users/alwalker/workspace/blinky

-- Zephyr version: 2.7.0 (/opt/nordic/ncs/v1.8.0/zephyr), build: v2.7.0-ncs1

-- Found Python3: /opt/nordic/ncs/v1.8.0/toolchain/opt/[email protected]/bin/python3.9 (found suitable exact version "3.9.6") found components: Interpreter 

-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")

-- Board: nrf5340dk_nrf5340_cpuapp

-- Cache files will be written to: /Users/alwalker/Library/Caches/zephyr

-- Found dtc: /opt/nordic/ncs/v1.8.0/toolchain/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")

-- Found toolchain: gnuarmemb (/opt/nordic/ncs/v1.8.0/toolchain)

-- Found BOARD.dts: /opt/nordic/ncs/v1.8.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts

-- Generated zephyr.dts: /Users/alwalker/workspace/blinky/build/zephyr/zephyr.dts

-- Generated devicetree_unfixed.h: /Users/alwalker/workspace/blinky/build/zephyr/include/generated/devicetree_unfixed.h

-- Generated device_extern.h: /Users/alwalker/workspace/blinky/build/zephyr/include/generated/device_extern.h

-- Including generated dts.cmake file: /Users/alwalker/workspace/blinky/build/zephyr/dts.cmake

Parsing /opt/nordic/ncs/v1.8.0/zephyr/Kconfig

/opt/nordic/ncs/v1.8.0/zephyr/scripts/kconfig/kconfig.py: /Users/alwalker/workspace/blinky/build/Kconfig/Kconfig.modules:38: Could not open '/opt/nordic/ncs/v1.8.0/zephyr/' (in 'osource "$(ZEPHYR_MCUBOOT_KCONFIG)"') (EISDIR: Is a directory)

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/alwalker/workspace/blinky/build/CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred!

FATAL ERROR: command exited with status 1: /opt/nordic/ncs/v1.8.0/toolchain/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/v1.8.0/toolchain/opt/[email protected]/bin/python3.9 -B/Users/alwalker/workspace/blinky/build -S/Users/alwalker/workspace/blinky -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONFIG_DEBUG_OPTIMIZATIONS:STRING=y -DCONFIG_DEBUG_THREAD_INFO:STRING=y -DCONF_FILE:STRING=/Users/alwalker/workspace/blinky/prj.conf

The terminal process terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Using macOS Finder to locate the individual header files, Seem to have found the first one ok but not the others:

What should the paths be for the other header files please?

Note that in macOS the /opt folder is normally hidden.

When I do a Pristine Build, this is what is displayed in Terminal:

ound toolchain: gnuarmemb (/opt/nordic/ncs/v1.8.0/toolchain)
-- Found BOARD.dts: /opt/nordic/ncs/v1.8.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: /Users/alwalker/workspace/blinky/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/alwalker/workspace/blinky/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /Users/alwalker/workspace/blinky/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /Users/alwalker/workspace/blinky/build/zephyr/dts.cmake
Parsing /opt/nordic/ncs/v1.8.0/zephyr/Kconfig
/opt/nordic/ncs/v1.8.0/zephyr/scripts/kconfig/kconfig.py: /Users/alwalker/workspace/blinky/build/Kconfig/Kconfig.modules:38: Could not open '/opt/nordic/ncs/v1.8.0/zephyr/' (in 'osource "$(ZEPHYR_MCUBOOT_KCONFIG)"') (EISDIR: Is a directory)
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/alwalker/workspace/blinky/build/CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/v1.8.0/toolchain/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/v1.8.0/toolchain/opt/[email protected]/bin/python3.9 -B/Users/alwalker/workspace/blinky/build -S/Users/alwalker/workspace/blinky -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONFIG_DEBUG_OPTIMIZATIONS:STRING=y -DCONFIG_DEBUG_THREAD_INFO:STRING=y -DCONF_FILE:STRING=/Users/alwalker/workspace/blinky/prj.conf
The terminal process terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

There also doesn't look to be a Kconfig file selected, this is not mentioned in the three YouTube videos:

 

Any guidance is very welcome!

  • Hi Einar,

    Good news! Having upgraded to macOS Monterey and done a fresh install of both nRF Connect and VS Code (including deleting relevant files from hidden folders), and following the instructions in videos 2 and 3, i can now get the Blinky application to build and then download and run ok on my target nRF5340 DK board.

    I can only assume that rolling back the version of nRF Connect due to the (now fixed) Programmer issue was the cause of the problems. 

    One remaining question, in the list of target boards for nRF5340 there are a number of options including the nrF5340dk_nrf5340_cpuapp that I selected. Is there a definition of what each of these options represents please?

  • Hi,

    I am glad to hear that it was resolved. Thanks for letting us know. That can be useful for others in the future.

    You can see a bit about this under Working with nRF5340 DK. In short:

    • The first part specifies the board, the second part specifies the IC, the third specifies the CPU core, and the optional last specifies if it is for non-secure domain.
      • nrf5340dk_nrf5340_cpuapp is the target for building firmware for the application core in secure mode (so not using a split between secure and non-secure)
      • nrf5340dk_nrf5340_cpuapp is the target for building firmware for the application core in non-secure mode. In this case, there is a split between secure and non-secure. See Application core for more.
      • nrf5340dk_nrf5340_cpunet is for the network core. (There is no HW support for separating between secure and non-secure domains on the network core.)
Related