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

nRF Connect SDK build error

Hi,

I am trying to configure the nRF Connect SDK on a Mac running Catalina for the first time and have followed the nRf Connect v3.6.0 - Getting Started Assistant.

I am getting errors when running "pip3 install -r zephyr/scripts/requirements.txt"

ERROR: nrfutil 5.2.0 has requirement click~=7.0, but you'll have click 6.7 which is incompatible.

ERROR: nrfutil 5.2.0 has requirement pyyaml~=4.2b1, but you'll have pyyaml 5.3.1 which is incompatible.

I am not sure how to resolve these dependency errors.

When I complete the SDK installation, it verifies each step with no errors but when I launch the SES (Nordic Edition) V5.10d with a nRF5340 PDK connected, I get a build error:

File "/Users/nick/Development/NordicConnectSDK/ncs/zephyr/scripts/dts/gen_defines.py", line 29, in <module>    import edtlib

File "/Users/nick/Development/NordicConnectSDK/ncs/zephyr/scripts/dts/edtlib.py", line 78, in <module>     import yaml

ModuleNotFoundError: No module named 'yaml'

The yaml module is in "/usr/local/lib/python3.7/site-packages/yaml" and the $PATH includes "/usr/local/lib/python3.7/site-packages".

I'm not sure if the pyyaml dependency error running the requirements script is related to this build error but I I would welcome any suggestions as I can't get past this point and build any of the sample apps.

Thanks!

Nick

  • Case 1:

    Case 2:

    /Users/nick/Development/NordicConnectSDK/ncs/zephyr/samples/hello_world

    ratpro:hello_world nick$ west build -b nrf5340pdk_nrf5340_cpuapp -p

    -- west build: generating a build system

    Including boilerplate (Zephyr base): /Users/nick/Development/NordicConnectSDK/ncs/zephyr/cmake/app/boilerplate.cmake

    -- Application: /Users/nick/Development/NordicConnectSDK/ncs/zephyr/samples/hello_world

    -- Zephyr version: 2.4.0 (/Users/nick/Development/NordicConnectSDK/ncs/zephyr)

    CMake Error at /Users/nick/Development/NordicConnectSDK/ncs/zephyr/cmake/west.cmake:14 (get_filename_component):

      get_filename_component called with incorrect number of arguments

    Call Stack (most recent call first):

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/cmake/app/boilerplate.cmake:139 (include)

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)

      CMakeLists.txt:5 (find_package)

    CMake Error at /Users/nick/Development/NordicConnectSDK/ncs/zephyr/cmake/west.cmake:42 (if):

      if given arguments:

        "NOT" "(" "/usr/local/Cellar/[email protected]/3.7.9_2/Frameworks/Python.framework/Versions/3.7/bin/python3.7" "STREQUAL" ")"

      Unknown arguments specified

    Call Stack (most recent call first):

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/cmake/app/boilerplate.cmake:139 (include)

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)

      CMakeLists.txt:5 (find_package)

    -- Configuring incomplete, errors occurred!

    FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/usr/local/opt/[email protected]/bin/python3.7 -B/Users/nick/Development/NordicConnectSDK/ncs/zephyr/samples/hello_world/build -S/Users/nick/Development/NordicConnectSDK/ncs/zephyr/samples/hello_world -GNinja -DBOARD=nrf5340pdk_nrf5340_cpuapp

    ratpro:hello_world nick$ 

  • Hi again.

    I see that this did not make things much better. Could I purpose that you remove your current installation of the gnuarmemb and download the signed app package instead? That could at least rule out any problems with Catelina's strict security. Links for download and additional instructions can be found in the manual installation guide for NCS.

    The errors you get when building from the command line stems from my initial suggestion to comment out lines in python.cmake. My apologies for this. Could you uncomment them and then see which Python version is used by SES by going to Tools -> Options -> nRF Connect SDK options?

    Best regards,
    Carl Richard

  • Carl,

    I downloaded the signed app package "gcc-arm-none-eabi-9-2020-q2-update-mac.pkg" and installed it.  It installed in /Applications/ARM so I copied into /opt/gnuarmemb as otherwise the SES could not locate it (even after changing the SES GNU ARM Embedded Tool Chain directory path variable).

    I tried uncommenting the python.cmake but then I got the yaml error again.

    I then ran the rm -r /Users/<your_username>/Library/Caches/zephyr and restarted SES and I was then able to build OK.  

    I can now see the files but when I try and build/debug I get a compile error about:

    nrfx.h: No such file or directory

    So I guess there is still an environment issue but at least I get to the project window now.

    For anyone else on a Mac, the main problem was using the "Mac OS X 64-bit Tarball" rather than the "Mac OS X 64-bit Package (Signed and notarized)" version of gcc-arm-none-eabi-9-2020-q2-update-mac

    Nick

  • Carl,

    When using the old nRF SDK, adding paths to include files was via SES options->preprocessor->user include directories - what is the equivalent in nRF Connect with the Nordic SES?

    Nick

  • Great to hear that it works now! 

    When it comes to the issue with nrfx.h, could you try to do the following:
    - check if the file <ncs_root>\modules\hal\nordic\nrfx\nrfx.h exists.
    - run the command west update inside the NCS root directory.

    Report back if it doesn't work.

    For adding additional files to your project, check out my answer in this thread

    Best regards,
    Carl Richard

Related