Adding Golioth to an existing nRF Project

Can you add Golioth as a module to the west manifest file for the nRF Connect SDK?

It’s located in the nrf/ folder:

<home>/
├─── toolchains/
│  └─── <toolchain-installation>
└─── <west-workspace>/
   ├─── .west/
   ├─── bootloader/
   ├─── modules/
   ├─── nrf/
   ├─── nrfxlib/
   ├─── zephyr/
   └─── ...

Your manifest file should look like this:

# The west manifest file (west.yml) for the nRF Connect SDK (NCS).
#
# The per-workspace west configuration file, ncs/.west/config,
# specifies the location of this manifest file like this:
#
#     [manifest]
#     path = nrf
#
# See the west documentation for more information:
#
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/west/index.html

manifest:
  version: "0.13"

  # "remotes" is a list of locations where git repositories are cloned
  # and fetched from.
  remotes:
    # nRF Connect SDK GitHub organization.
    # NCS repositories are hosted here.
    - name: ncs
      url-base: https://github.com/nrfconnect
    # Third-party repository sources:
    - name: zephyrproject
      url-base: https://github.com/zephyrproject-rtos
    - name: throwtheswitch
      url-base: https://github.com/ThrowTheSwitch
    - name: armmbed
      url-base: https://github.com/ARMmbed
    - name: nordicsemi
      url-base: https://github.com/NordicSemiconductor
    - name: dragoon
      url-base: https://projecttools.nordicsemi.no/bitbucket/scm/drgn
    - name: memfault
      url-base: https://github.com/memfault
    - name: ant-nrfconnect
      url-base: https://github.com/ant-nrfconnect
    - name: babblesim
      url-base: https://github.com/BabbleSim
    - name: bosch
      url-base: https://github.com/boschsensortec

  # If not otherwise specified, the projects below should be obtained
  # from the ncs remote.
  defaults:
    remote: ncs

  group-filter: [-homekit, -nrf-802154, -dragoon, -find-my, -ant, -babblesim, -sidewalk, -bsec]

  # "projects" is a list of git repositories which make up the NCS
  # source code.
  #
  # For 'userdata' fields in the projects area, please refer to:
  # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/dm_code_base.html
  projects:
    # Golioth repository.
    - name: golioth
      path: modules/lib/golioth-firmware-sdk
      revision: main
      url: https://github.com/golioth/golioth-firmware-sdk.git
      submodules: true

    # The Zephyr RTOS fork in the NCS, along with the subset of its
    # modules which NCS imports directly.
    #
    # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/introduction/index.html
    # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html
    - name: zephyr
      repo-path: sdk-zephyr
      revision: v3.4.99-ncs1-2
      import:
...

Afterward, can you run west update from the <west-workspace> folder and try to build the hello sample located at modules/lib/golioth-firmware-sdk/examples/zephyr/hello ?

Also, are you using nRF Connect SDK v2.5.2? That is the latest version verified by our Continuous Integration system.

1 Like