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

nRF Connect SDK Tutorial

I am using  nRF Connect SDK Tutorial - Part 1 | NCS v1.4.0.

I am using MacOS and nRF Connect SDK v1.6.1.

a. The JlinkExe executes but JLinkRTTClientExe doesn't show any message

b. the command $west build -b nrf5340dk_nrf5340_cpuapp_ns produces:

usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...

west: error: argument <command>: invalid choice: 'build' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')

I don't know why west doesn't recognize its install directory, even though I have the following env variables set correctly

>echo $ZEPHYR_TOOLCHAIN_VARIANT  

gnuarmemb

>echo $GNUARMEMB_TOOLCHAIN_PATH  

/opt/nordic/ncs/v1.6.1/toolchain

I used $west init but compiler generates error message.

Does this tutorial actually work?

  • Hi Persimmon

    If do not have a reason for installing NCS manually, I would recommend the nRF Connect for Desktop, and its function Toolchain manager.
    Otherwise, let me know, and I will help you with the manual install.

    Regards,
    Sigurd Hellesvik

  • Thank you for the offer. But I did use nRF connect for desktop (on Mac) and still West gives me the output I mentioned.  

  • Hi

    In the toolchain manager, after installing your preffered version of NCS, select the options menu, and "Open Terminal."
    When the terminal opens, try to type:

    west update

    Can you post a copy or screenshot of the result from this command?
    (If you copy in code, it is easier to read if you use the Insert->Code in this editor)

    Regards,
    Hellesvik

  • west update seems okay. west build is not working.



    /opt/nordic/ncs/v1.6.1 -> west update                                     

    === updating zephyr (zephyr):

    HEAD is now at a62ea8fa29 [nrf fromlist] net: openthread: remove unneded Kconfig dependency

    === updating openthread (modules/lib/openthread):

    HEAD is now at f460532d4 Merge pull request #41 from kkasperczyk-no/ot_upmerge

    === updating mcuboot (bootloader/mcuboot):

    HEAD is now at 02afea3 [nrf fromtree] cmake: fix for issue with path length on windows

    === updating nrfxlib (nrfxlib):

    HEAD is now at c5efbc8 doc: update changelogs for 1.6.1

    === updating trusted-firmware-m (modules/tee/tfm):

    HEAD is now at cb1e6c2f [nrf fromlist] partitions: crypto: introduce option to disable RNG ...

    === updating tfm-mcuboot (modules/tee/tfm-mcuboot):

    HEAD is now at 4aa516e Bump versions for v1.7.2

    === updating matter (modules/lib/matter):

    HEAD is now at f2143619 [nrf toup] reduce command parameters length

    Synchronizing submodule url for 'third_party/nlio/repo'

    Synchronizing submodule url for 'third_party/nlassert/repo'

    Synchronizing submodule url for 'third_party/pigweed/repo'

    === updating cjson (modules/lib/cjson):

    HEAD is now at 50bdddd [nrf fromlist] Add more CS versions of cJSON_Add functions

    === updating cmock (test/cmock):

    M vendor/unity

    HEAD is now at 9d09289 Merge pull request #346 from ThrowTheSwitch/reapply_329

    === updating unity (test/cmock/vendor/unity):

    HEAD is now at 74cde08 Merge pull request #540 from numaru/master

    === updating mbedtls-nrf (mbedtls):

    HEAD is now at e483a77c8 Merge pull request #816 from ARMmbed/development

    === updating nanopb (modules/lib/nanopb):

    HEAD is now at df0e92f Publishing nanopb-0.4.2

    === updating Alexa-Gadgets-Embedded-Sample-Code (modules/alexa-embedded):

    HEAD is now at face92d Update firmware.options signature_size from 48 to 65

    === updating mbed-cloud-client (modules/lib/pelion-dm):

    HEAD is now at 7e45d92 Merge pull request #84 from PelionIoT/release-4.9.1

    === updating cddl-gen (modules/lib/cddl-gen):

    HEAD is now at 24f1b2b module: leverage external module definition

    === updating memfault-firmware-sdk (modules/lib/memfault-firmware-sdk):

    --- memfault-firmware-sdk: fetching, need revision 0.21.1

    From github.com/.../memfault-firmware-sdk

     * tag               0.21.1     -> FETCH_HEAD

    HEAD is now at 2ad18e1 Memfault Firmware SDK 0.21.1 (Build 241141)

    === updating cmsis (modules/hal/cmsis):

    HEAD is now at c3bd209 DSP: fix compiler warning on inline attribute

    === updating canopennode (modules/lib/canopennode):

    HEAD is now at 468d350 Merge pull request #2 from vestas-wind-systems/update_to_v1_3_master

    === updating civetweb (modules/lib/civetweb):

    HEAD is now at e6903b80 civetweb: WebSockets support for Zephyr

    === updating fatfs (modules/fs/fatfs):

    HEAD is now at 1d1fcc7 fat_fs: Expose _VOLUMES to Kconfig

    === updating hal_nordic (modules/hal/nordic):

    HEAD is now at 74b3b21 drivers: nrf_802154: Update the IEEE 802.15.4 component

    === updating hal_st (modules/hal/st):

    HEAD is now at b52fdbf sensor/stmemsc: Align stmemsc i/f to v1.03

    === updating libmetal (modules/hal/libmetal):

    HEAD is now at 39d049d lib: update libmetal to release v2021.04.0 + VERSION path fix

    === updating lvgl (modules/lib/gui/lvgl):

    HEAD is now at 31acbaa3 lv_font: Fix compiler warning when compressed fonts are disabled (#1880)

    === updating mbedtls (modules/crypto/mbedtls):

    HEAD is now at 711fe7f Check if feature macro is defined before define it

    === updating mcumgr (modules/lib/mcumgr):

    HEAD is now at 5c5055f snapshot: Update mcumgr to commit e64f5060bd from upstream

    === updating net-tools (tools/net-tools):

    HEAD is now at f49bd13 net-capture: Listen captured traffic and save to pcap file

    === updating open-amp (modules/lib/open-amp):

    HEAD is now at 6010f05 lib: update open-amp lib to release v2021.04.0

    === updating loramac-node (modules/lib/loramac-node):

    HEAD is now at 2cee5f72 LoRaMac: query minimum tx datarate

    === updating segger (modules/debug/segger):

    HEAD is now at 7cbc844 config: Add lock/unlock macro for no multithreading

    === updating tinycbor (modules/lib/tinycbor):

    HEAD is now at 40daca9 zephyr: Remove TINYCBOR from interface libraries

    === updating tinycrypt (modules/crypto/tinycrypt):

    HEAD is now at 3e9a49d cmake: Fix conditional in root CMakeLists.txt

    === updating littlefs (modules/fs/littlefs):

    HEAD is now at 9e4498d lfs_util: fix log declaration when logging is disabled

    === updating mipi-sys-t (modules/debug/mipi-sys-t):

    HEAD is now at 75e6715 zephyr: move platform.h to zephyr tree

    === updating nrf_hw_models (modules/bsim_hw_models/nrf_hw_models):

    HEAD is now at a47e326 HW_models: NRF_RTC: Fix compare event missed when interrupt disabled

    === updating TraceRecorderSource (modules/debug/TraceRecorder):

    HEAD is now at d988988 zephyr: do not check for rtt mutex

    === updating edtt (tools/edtt):

    HEAD is now at 7dd56fc Add FIXME note to handle incorrect LL/CON/MAS/BV-27-C implementation


    ~/git/nrf5340-hello-world 
    ─> west build -b nrf5340dk_nrf5340_cpuapp_ns    

    usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...

    west: error: argument <command>: invalid choice: 'build' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')


  • Hi

    The west build command should be set by Zephyr.
    Maybe ZEPHYR_BASE environment variable is not set.
    Try to

    echo $ZEPHYR_BASE

    This should be "/opt/nordic/ncs/v1.6.1/zephyr".
    If this is not the case, try

    export ZEPHYR_BASE=/opt/nordic/ncs/v1.6.1/zephyr

    Regards,
    Sigurd Hellesvik

Related