Skip to content
  • Damian Królik's avatar
    Add support for nRF Connect SDK (#1494) · 34a4a937
    Damian Królik authored
    
    
    * Add CMake module for building CHIP examples with Nordic NCS
    
    Currently Nordic platform layer of CHIP is based on nRF5
    SDK. This commit is the first step needed to replace it
    with nRF Connect SDK based on Zephyr RTOS. While the old
    platform layer remains unchanged, add a CMake helper file
    which allows to build the entire CHIP using the NCS/Zephyr
    build system.
    
    * Port part of the door-lock example to Nordic Connect SDK
    
    Rewrite everything which doesn't depend on the CHIP platform
    layers using the NCS/Zephyr API. This includes functionality
    of the sample app related to LEDs, buttons, timers, message
    queues and logging.
    
    * Implement PlatformManagerImpl for nRF Connect SDK
    
    Implement PlatformManagerImpl for nRF Connect SDK based on
    generic implementation for Zephyr RTOS. Also provide initial
    implementation of functions to retrieve system time using
    Zephyr API and add Zephyr-based logging backend.
    
    The code compiles, but it requires other components to be
    tested.
    
    * Add empty stubs for nRF Connect platform layer
    
    This commit adds empty implementations of base platform functions.
    
    * Add ThreadStackManager implementation and enable OT
    
    This commit enables the OT stack in the Zephyr application.
    The ThreadStackManager allows the CHIP stack to control the
    state of the stack embedded into the Zephyr.
    It is required that all calls to this class are to be made
    from a cooperative task priority.
    
    * Adapt Inet layer to Zephyr networking API
    
    Make necessary changes to build CHIP Inet library using
    Zephyr networking API. Zephyr provides BSD-like socket
    interface, however a few things are missing:
    
    - some socket-related functions are not available, e.g.
      getsockname, recvmsg etc. Implement required
      replacements.
    - some constants are not available. In particular, some
      options passed to the setsockopt function must have been
      made optional. In case e.g. explicit multicast group
      management is needed we will have find another ways
      to implement that in Zephyr.
    - the whole ifaddrs library doesn't exist in Zephyr, so
      all the interface/address enumeration code must have been
      implemented for Zephyr.
    - disable TCP end point for nRF Connect SDK platform for
      now as it will require further changes.
    
    * Add ConnectivityManager for nRF Connect
    
    * Add README.md
    
    * Add ZCL server to the door-lock example for nRF Connect
    
    Co-authored-by: default avatarRafał Kuźnia <rafal.kuznia@nordicsemi.no>
    
    * Apply code-review suggestions
    
    * Restyled by whitespace
    
    Co-authored-by: default avatarRafał Kuźnia <rafal.kuznia@nordicsemi.no>
    Co-authored-by: default avatarRestyled.io <commits@restyled.io>
    34a4a937
Loading