How to build an application with custom board file based on nrf9160

I have a custom board file which is based on nrf9160, I want to use it using the west build command and later flash it. I tried the steps under this tutorial: Nordic academy and used DBoardname in the build command but it is still failing. The error is as follows : 

PS C:\Users\FutureLab\zephyrproject\zephyr> west build -b ciot_connectivity_boardns -- -DBOARD_ROOT="C:\Users\FutureLab\zephyrproject\zephyr\cellular-edge-sdk-master\boards\arm" cellular-edge-sdk-master/samples/getting_started
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base (cached)).
-- Application: C:/Users/FutureLab/zephyrproject/zephyr/cellular-edge-sdk-master/samples/getting_started
-- CMake version: 3.28.0-rc1
-- Cache files will be written to: C:/Users/FutureLab/zephyrproject/zephyr/.cache
-- Zephyr version: 3.6.99 (C:/Users/FutureLab/zephyrproject/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
CMake Warning at C:/Users/FutureLab/zephyrproject/zephyr/cmake/modules/boards.cmake:136 (message):
  BOARD_ROOT element without a 'boards' subdirectory:


  C:\Users\FutureLab\zephyrproject\zephyr\cellular-edge-sdk-master\boards\arm


  Hints:

    - if your board directory is '/foo/bar/boards/<ARCH>/my_board' then add '/foo/bar' to BOARD_ROOT, not the entire board directory 
    - if in doubt, use absolute paths
Call Stack (most recent call first):
  C:/Users/FutureLab/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:132 (include)
  C:/Users/FutureLab/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  C:/Users/FutureLab/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
  CMakeLists.txt:11 (find_package)


No board named 'ciot_connectivity_boardns' found.
is there something I am missing?

what else do I need do?

I already have the board files so I dont think there is any  need to again use the custom baord option in VS code to create the board files again.

Parents
  • Hello, 

    From the provided build logs it looks like you are working with the Zephyr project alone, and not the nRF Connect SDK. Can you please confirm?

    Thanks.

    Kind regards,
    Øyvind

  • Hi,

    I wanted to somehow integrate with nrf SDK connect such that, in vs code wen trying to build it, this board option will pop up but that did not work out, so I started building with zephyr, but still the build was not successful.

    I tried using the boards present in the sample which I wanted to work with so used the DBoard command with that: 

    west build -b ciot_connectivity_boardns -- -DBOARD_ROOT="C:\Users\FutureLab\zephyrproject\zephyr\cellular-edge-sdk-master\samples\getting_started" 
    cellular-edge-sdk-master/samples/getting_started

    which produced the following error:

    west build -b ciot_connectivity_boardns -- -DBOARD_ROOT="C:\Users\FutureLab\zephyrproject\zephyr\cellular-edge-sdk-master\samples\getting_started" 
    cellular-edge-sdk-master/samples/getting_started
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: C:/Users/FutureLab/zephyrproject/zephyr/cellular-edge-sdk-master/samples/getting_started
    -- CMake version: 3.28.0-rc1
    -- Cache files will be written to: C:/Users/FutureLab/zephyrproject/zephyr/.cache
    -- Zephyr version: 3.6.99 (C:/Users/FutureLab/zephyrproject/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: ciot_connectivity_boardns
    -- Found host-tools: zephyr 0.16.8 (C:/Users/FutureLab/zephyr-sdk-0.16.8)
    -- Found toolchain: zephyr 0.16.8 (C:/Users/FutureLab/zephyr-sdk-0.16.8)
    -- Found BOARD.dts: C:/Users/FutureLab/zephyrproject/zephyr/cellular-edge-sdk-master/samples/getting_started/boards/arm/ciot_connectivity_boardns/ciot_connectivity_boardns.dts
    -- Found devicetree overlay: C:/Users/FutureLab/zephyrproject/zephyr/cellular-edge-sdk-master/samples/getting_started/boards/ciot_connectivity_boardns.overlay
    devicetree error: 'pinctrl-0' is marked as required in 'properties:' in C:/Users/FutureLab/zephyrproject/zephyr/dts/bindings\serial\nordic,nrf-uarte.yaml, but does not appear in <Node /soc/peripheral@50000000/uart@9000 in 'C:/Users/FutureLab/zephyrproject/zephyr/misc/empty_file.c'>
    -- In: C:/Users/FutureLab/zephyrproject/zephyr/build/zephyr, command: C:/Users/FutureLab/AppData/Local/Programs/Python/Python312/python.exe;C:/Users/FutureLab/zephyrproject/zephyr/scripts/dts/gen_defines.py;--dts;C:/Users/FutureLab/zephyrproject/zephyr/build/zephyr/zephyr.dts.pre;--dtc-flags;'';--bindings-dirs;C:/Users/FutureLab/zephyrproject/zephyr/dts/bindings;--header-out;C:/Users/FutureLab/zephyrproject/zephyr/build/zephyr/include/generated/zephyr/devicetree_generated.h.new;--dts-out;C:/Users/FutureLab/zephyrproject/zephyr/build/zephyr/zephyr.dts.new;--edt-pickle-out;C:/Users/FutureLab/zephyrproject/zephyr/build/zephyr/edt.pickle;--vendor-prefixes;C:/Users/FutureLab/zephyrproject/zephyr/dts/bindings/vendor-prefixes.txt
    CMake Error at C:/Users/FutureLab/zephyrproject/zephyr/cmake/modules/dts.cmake:296 (message):
      gen_defines.py failed with return code: 1
    Call Stack (most recent call first):
      C:/Users/FutureLab/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:132 (include)
      C:/Users/FutureLab/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/Users/FutureLab/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
      CMakeLists.txt:11 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    ←[91mFATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' -DWEST_PYTHON=C:/Users/FutureLab/AppData/Local/Programs/Python/Python312/python.exe '-BC:\Users\FutureLab\zephyrproject\zephyr\build' -GNinja '-DBOARD_ROOT=C:\Users\FutureLab\zephyrproject\zephyr\cellular-edge-sdk-master\samples\getting_started' cellular-edge-sdk-master/samples/getting_started 
    '-SC:\Users\FutureLab\zephyrproject\zephyr\cellular-edge-sdk-master\samples\getting_started'
    ←[0m

  • Could you please switch over to nRF Connect SDK and provide whatever error you receive? 

Reply Children
Related