What west command line to use for the Thingy:91 for zephyr RTOS samples

Hi,

I've been building nRF52840 applications from the command line using the zephyr RTOS for a while, but having taken delivery of the Thingy:91, am unable to get the hello_world sample to build.

https://docs.zephyrproject.org/latest/samples/hello_world/README.html

I'd be surprised if the Thingy:91 was not supported by the zephyrr RTOS, which boards are listed as follows:

https://docs.zephyrproject.org/latest/boards/index.html#boards

Which supported board target do I use as the west build target to build the hello_world sample?

The following build target (nrf9160dk_nrf52840) is clearly wrong (or is it? It throws an error when executing this command):

west build -p auto -b nrf9160dk_nrf52840 samples/hello_world

Does anyone know the correct build target to use - or if the above west CLI command is poorly constructed, know the correct one to use?

The build output from the above command is attached on the CommandLineBuild.txt file below.

Thanks!

(base) developer@Developers-Mini zephyr % west build -p auto -b nrf9160dk_nrf52840 samples/hello_world
-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): /Users/developer/zephyrproject/zephyr/cmake/app/boilerplate.cmake
-- Application: /Users/developer/zephyrproject/zephyr/samples/hello_world
-- Zephyr version: 3.0.0-rc3 (/Users/developer/zephyrproject/zephyr)
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf9160dk_nrf52840, Revision: 0.7.0
-- Cache files will be written to: /Users/developer/Library/Caches/zephyr
-- Found dtc: /opt/homebrew/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/Users/developer/source/zephyr/gnuarmemb/gcc-arm-none-eabi-10.3-2021.10)
-- Found BOARD.dts: /Users/developer/zephyrproject/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840.dts
-- Generated zephyr.dts: /Users/developer/zephyrproject/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/developer/zephyrproject/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /Users/developer/zephyrproject/zephyr/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /Users/developer/zephyrproject/zephyr/build/zephyr/dts.cmake
Parsing /Users/developer/zephyrproject/zephyr/Kconfig
Loaded configuration '/Users/developer/zephyrproject/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_defconfig'
Merged configuration '/Users/developer/zephyrproject/zephyr/samples/hello_world/prj.conf'

warning: HAS_NORDIC_DRIVERS (defined at modules/hal_nordic/Kconfig:7) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - SOC_SERIES_NRF52X (defined at soc/arm/nordic_nrf/nrf52/Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)

warning: HAS_NRFX (defined at modules/hal_nordic/nrfx/Kconfig:4) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - SOC_SERIES_NRF52X (defined at soc/arm/nordic_nrf/nrf52/Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)

warning: NRFX_CLOCK (defined at modules/hal_nordic/nrfx/Kconfig:14) has direct dependencies HAS_HW_NRF_CLOCK && HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - CLOCK_CONTROL_NRF (defined at drivers/clock_control/Kconfig.nrf:13), with value y, direct dependencies SOC_COMPATIBLE_NRF && CLOCK_CONTROL (value: y), and select condition !CLOCK_CONTROL_NRF_FORCE_ALT && SOC_COMPATIBLE_NRF && CLOCK_CONTROL (value: y)

warning: NRFX_CLOCK_LFXO_TWO_STAGE_ENABLED (defined at modules/hal_nordic/nrfx/Kconfig:18) has direct dependencies NRFX_CLOCK && HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - CLOCK_CONTROL_NRF_K32SRC_XTAL (defined at drivers/clock_control/Kconfig.nrf:36), with value y, direct dependencies <choice CLOCK_CONTROL_NRF_SOURCE> (value: y), and select condition !SOC_SERIES_BSIM_NRFXX && !CLOCK_CONTROL_NRF_FORCE_ALT && <choice CLOCK_CONTROL_NRF_SOURCE> (value: y)

warning: NRFX_GPIOTE (defined at modules/hal_nordic/nrfx/Kconfig:65) has direct dependencies HAS_HW_NRF_GPIOTE && HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - GPIO_NRFX (defined at drivers/gpio/Kconfig.nrfx:4), with value y, direct dependencies SOC_FAMILY_NRF && GPIO (value: y), and select condition SOC_FAMILY_NRF && GPIO (value: y)

warning: NRFX_PPI (defined at modules/hal_nordic/nrfx/Kconfig:109, drivers/serial/Kconfig.nrfx:381) has direct dependencies (HAS_HW_NRF_PPI && HAS_NRFX && 0) || (HAS_HW_NRF_PPI && (UART_0_NRF_HW_ASYNC || UART_1_NRF_HW_ASYNC || UART_2_NRF_HW_ASYNC || UART_3_NRF_HW_ASYNC) && UART_NRFX && SERIAL) with value n, but is currently being y-selected by the following symbols:
 - UART_ENHANCED_POLL_OUT (defined at drivers/serial/Kconfig.nrfx:398), with value y, direct dependencies (UART_0_ENHANCED_POLL_OUT || UART_1_ENHANCED_POLL_OUT || UART_2_ENHANCED_POLL_OUT || UART_3_ENHANCED_POLL_OUT) && UART_NRFX && SERIAL (value: y), and select condition HAS_HW_NRF_PPI && (UART_0_ENHANCED_POLL_OUT || UART_1_ENHANCED_POLL_OUT || UART_2_ENHANCED_POLL_OUT || UART_3_ENHANCED_POLL_OUT) && UART_NRFX && SERIAL (value: y)

error: Aborting due to Kconfig warnings

CMake Error at /Users/developer/zephyrproject/zephyr/cmake/kconfig.cmake:272 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /Users/developer/zephyrproject/zephyr/cmake/app/boilerplate.cmake:543 (include)
  /Users/developer/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /Users/developer/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
  CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /opt/homebrew/bin/cmake -DWEST_PYTHON=/opt/anaconda3/bin/python -B/Users/developer/zephyrproject/zephyr/build -S/Users/developer/zephyrproject/zephyr/samples/hello_world -GNinja -DBOARD=nrf9160dk_nrf52840

  • Hi, 

    From the output log that you have provided it looks like you are using a clean Zephyr SDK (zephyrproject/zephyr/). Have you installed nRF Connect SDK? If so, the board files for the Thingy:91 is located in nrf\boards\arm\thingy91_nrf9160. Please note that the Thingy:91 is a prototype platform and is different to flash compared to a development kit. Our nRF Connect SDK documentation covers this in the "Getting started with the Thingy:91"

    Does anyone know the correct build target to use - or if the above west CLI command is poorly constructed, know the correct one to use?

    I had no issues building the hello_world sample as you asked

    S C:\NordicSemi\v1.9.1> west build -p auto -b nrf9160dk_nrf52840 .\zephyr\samples\hello_world\
    -- west build: generating a build system
    Including boilerplate (Zephyr base): C:/NordicSemi/v1.9.1/zephyr/cmake/app/boilerplate.cmake
    -- Application: C:/NordicSemi/v1.9.1/zephyr/samples/hello_world
    -- Using NCS Toolchain 1.9.1 for building. (C:/NordicSemi/v1.9.1/toolchain/cmake)
    -- Zephyr version: 2.7.99 (C:/NordicSemi/v1.9.1/zephyr), build: v2.7.99-ncs1-1
    -- Found Python3: C:/NordicSemi/v1.9.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf52840, Revision: 0.7.0
    -- Cache files will be written to: C:\Users\oysa\AppData\Local/.cache/zephyr
    -- Found dtc: C:/NordicSemi/v1.9.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    CMake Warning at C:/NordicSemi/v1.9.1/zephyr/cmake/toolchain/gnuarmemb/generic.cmake:6 (message):
      GCCARMEMB_TOOLCHAIN_PATH is deprecated, please use GNUARMEMB_TOOLCHAIN_PATH
      instead
    Call Stack (most recent call first):
      C:/NordicSemi/v1.9.1/zephyr/cmake/generic_toolchain.cmake:36 (include)
      C:/NordicSemi/v1.9.1/zephyr/cmake/app/boilerplate.cmake:542 (include)
      C:/NordicSemi/v1.9.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
      C:/NordicSemi/v1.9.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
      CMakeLists.txt:5 (find_package)
    
    
    -- Found toolchain: gnuarmemb (C:\gnuarmemb)
    -- Found BOARD.dts: C:/NordicSemi/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840.dts
    -- Generated zephyr.dts: C:/NordicSemi/v1.9.1/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/NordicSemi/v1.9.1/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/NordicSemi/v1.9.1/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/NordicSemi/v1.9.1/build/zephyr/dts.cmake
    Parsing C:/NordicSemi/v1.9.1/zephyr/Kconfig
    Loaded configuration 'C:/NordicSemi/v1.9.1/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_defconfig'
    Merged configuration 'C:/NordicSemi/v1.9.1/zephyr/samples/hello_world/prj.conf'
    Configuration saved to 'C:/NordicSemi/v1.9.1/build/zephyr/.config'
    Kconfig header saved to 'C:/NordicSemi/v1.9.1/build/zephyr/include/generated/autoconf.h'
    C:\gnuarmemb\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
    -- The C compiler identification is GNU 8.3.1
    -- The CXX compiler identification is GNU 8.3.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/NordicSemi/v1.9.1/build
    -- west build: building application
    [150/160] Linking C executable zephyr\zephyr_pre0.elf
    
    [154/160] Linking C executable zephyr\zephyr_pre1.elf
    
    [160/160] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       22000 B         1 MB      2.10%
                SRAM:        6208 B       256 KB      2.37%
            IDT_LIST:          0 GB         2 KB      0.00%
    PS C:\NordicSemi\v1.9.1> 

    Kind regards,
    Øyvind

Related