8000 [nRF52840] Suggestion for improving the nRF52840 dongle lighting-app build instructions · Issue #25310 · project-chip/connectedhomeip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[nRF52840] Suggestion for improving the nRF52840 dongle lighting-app build instructions #25310
Open
@MonicaisHer

Description

@MonicaisHer

Hello, I followed the original guidelines for the nrf52840 dongle, but I encountered the following error while building:

~/connectedhomeip/examples/lighting-app/nrfconnect$ west build -b nrf52840dongle_nrf52840

-- west build: generating a build system
-- Found Python3: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter 
fatal: cannot change to '/home/mengyi/connectedhomeip/examples/lighting-app/nrfconnect/zephyr/../nrf': No such file or directory
Command '['git', '-C', '/home/mengyi/connectedhomeip/examples/lighting-app/nrfconnect/zephyr/../nrf', 'rev-list', '-n', '1', 'HEAD']' returned non-zero exit status 128.
Loading Zephyr default modules (Zephyr base (cached)).
-- Application: /home/mengyi/connectedhomeip/examples/lighting-app/nrfconnect
-- CMake version: 3.25.2
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter 
-- Cache files will be written to: /home/mengyi/.cache/zephyr
-- Zephyr version: 3.3.99 (/home/mengyi/connectedhomeip/examples/lighting-app/nrfconnect/zephyr)
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
CMake Error at zephyr/cmake/modules/zephyr_module.cmake:72 (message):
  Unmet or cyclic dependencies in modules:

  /home/mengyi/connectedhomeip/config/nrfconnect/chip-module depends on:
  ['nrfxlib', 'openthread']

With the same environment, I was able to build the firmware for the nRF52840 development kit (west build -b nrf52840dk_nrf52840). It only fails when building for the nRF52840 dongle.

As a workaround, I was able to successfully build and flash the lighting app on the nRF52840 dongle using the following alternative steps. However, this required me to use specific versions of the required tooling (such as west and nrf) and extra flag:

  1. Download nRF Connect for Desktop and run.
  2. Install and open Toolchain Manager application.
  3. Install nRF Connect SDK 2.1.0.
  4. Click the down arrow next to the version you installed and select Open Terminal or Open Bash.
  5. Run:
python3 -m pip install -U west==0.13.1
   
cd ~
git clone https://github.com/project-chip/connectedhomeip.git --depth=1
cd connectedhomeip
git fetch origin v1.0-branch
git checkout a17c005209fbde737edb97b0f51ea63472c166aa
git submodule update --init

~/connectedhomeip/scripts/setup/nrfconnect/update_ncs.py --update
source ~/connectedhomeip/scripts/activate.sh

cd examples/lighting-app/nrfconnect/
west build -b nrf52840dongle_nrf52840 -- -DCONF_FILE=./prj_no_dfu.conf

The output of .hex file could be found in this path: ~/connectedhomeip/examples/lighting-app/nrfconnect/build/zephyr/zephyr.hex

Note: it works when checkout the code at hash a17c005 but not from master.

References:

Furthermore, I discovered that the nRF52840 dongle does not have an external flash required for DFU as documented here. As a result, I was unable to use the default configuration on this dongle. Adding the prj_no_dfu.conf flag allowed me to successfully build and flash the lighting app on the dongle.

Upon reviewing the nrfconnect lighting app README documentation in connectionhomeip, I noticed that there is a link provided that redirects users to the Nordic documentation for the dongle. However, I found that this documentation only provides general instructions for the dongle and does not offer specific guidance for building and flashing the lighting app on the dongle.

I suggest adding more details to the README's Flashing on the nRF52840 Dongle section providing step-by-step instructions. I believe this would be extremely helpful in enabling users to successfully build and use the nRF52840 dongle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0